diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-03-18 18:23:14 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-03-18 18:23:14 +0000 |
commit | dfa68883113045aad4bfab87c82b54d0c98d0a89 (patch) | |
tree | bab2f4c23af96f1bb8b8a9850f9d503249df46af /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 856a4dcf1207e888b23016cac6a64582051aa0ff (diff) | |
download | rails-dfa68883113045aad4bfab87c82b54d0c98d0a89.tar.gz rails-dfa68883113045aad4bfab87c82b54d0c98d0a89.tar.bz2 rails-dfa68883113045aad4bfab87c82b54d0c98d0a89.zip |
Migrations: create_table supports primary_key_prefix_type. Closes #10314.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index b471b153de..b1f1fd4d73 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -89,7 +89,7 @@ module ActiveRecord # See also TableDefinition#column for details on how to create columns. def create_table(table_name, options = {}) table_definition = TableDefinition.new(self) - table_definition.primary_key(options[:primary_key] || "id") unless options[:id] == false + table_definition.primary_key(options[:primary_key] || Base.get_primary_key(table_name)) unless options[:id] == false yield table_definition |