diff options
author | schneems <richard.schneeman@gmail.com> | 2016-01-07 17:12:58 -0600 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2016-01-08 09:09:00 -0600 |
commit | 350ae6cdc1ea83e21c23abd10e7e99c9a0bbdbd2 (patch) | |
tree | b73b21f2a6d717198583f270769f436d464cc222 /activerecord/lib | |
parent | 921997675258147fdc2bbbca0da4fb0c771c218d (diff) | |
download | rails-350ae6cdc1ea83e21c23abd10e7e99c9a0bbdbd2.tar.gz rails-350ae6cdc1ea83e21c23abd10e7e99c9a0bbdbd2.tar.bz2 rails-350ae6cdc1ea83e21c23abd10e7e99c9a0bbdbd2.zip |
Use `key` as primary key in schema.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/internal_metadata.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/internal_metadata.rb b/activerecord/lib/active_record/internal_metadata.rb index e907bd0563..fc1bb0bdce 100644 --- a/activerecord/lib/active_record/internal_metadata.rb +++ b/activerecord/lib/active_record/internal_metadata.rb @@ -35,7 +35,7 @@ module ActiveRecord # Creates a internal metadata table with columns +key+ and +value+ def create_table unless table_exists? - connection.create_table(table_name, id: false) do |t| + connection.create_table(table_name, primary_key: :key, id: false ) do |t| t.column :key, :string t.column :value, :string t.timestamps |