Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More incremental work on active schema for MySQL

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit ef214ecc40f34006f88fc4b636dc3457f76deba6 1 parent 6578680
@dhh dhh authored
View
2  activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -359,7 +359,7 @@ def add_limit!(sql, limit)
def initialize_schema_information
begin
- execute "CREATE TABLE schema_info (version #{native_database_types[:integer]})"
+ execute "CREATE TABLE schema_info (version #{native_database_types[:integer][:name]}#{native_database_types[:integer][:limit]})"
insert "INSERT INTO schema_info (version) VALUES(0)"
rescue ActiveRecord::StatementInvalid
# Schema has been intialized
View
2  activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -66,7 +66,7 @@ class MysqlAdapter < AbstractAdapter
def native_database_types
{
- :primary_key => { :name => "int(11) DEFAULT NULL auto_increment PRIMARY KEY" },
+ :primary_key => "int(11) DEFAULT NULL auto_increment PRIMARY KEY",
:string => { :name => "varchar", :limit => 255 },
:text => { :name => "text" },
:integer => { :name => "int", :limit => 11 },

0 comments on commit ef214ec

Please sign in to comment.
Something went wrong with that request. Please try again.