diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-10 14:30:35 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-10 14:30:35 +0000 |
commit | ef214ecc40f34006f88fc4b636dc3457f76deba6 (patch) | |
tree | 999459dddb925091d66b78064f3a3cd03db235e7 /activerecord/lib | |
parent | 65786805ca89bbcaf7aa89e74f99964e0f5fd89e (diff) | |
download | rails-ef214ecc40f34006f88fc4b636dc3457f76deba6.tar.gz rails-ef214ecc40f34006f88fc4b636dc3457f76deba6.tar.bz2 rails-ef214ecc40f34006f88fc4b636dc3457f76deba6.zip |
More incremental work on active schema for MySQL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index ba18bad504..cf7f07ba26 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -359,7 +359,7 @@ module ActiveRecord 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 diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 9537269260..fd730a12dc 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -66,7 +66,7 @@ module ActiveRecord 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 }, |