diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-14 14:06:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 14:06:33 -0400 |
commit | b81288541b6c8fe04082e4579e549bd71bc350dd (patch) | |
tree | a22505351281f00cc177bf68321e18fddd26f295 /activerecord/test/schema | |
parent | 4915bfeeea88889341153cad9166090c2d6b1910 (diff) | |
parent | 9b8c7796a9c2048208aa843ad3dc477dffa8bdee (diff) | |
download | rails-b81288541b6c8fe04082e4579e549bd71bc350dd.tar.gz rails-b81288541b6c8fe04082e4579e549bd71bc350dd.tar.bz2 rails-b81288541b6c8fe04082e4579e549bd71bc350dd.zip |
Merge pull request #29378 from kamipo/avoid_overwriting_id_attribute_methods
Avoid overwriting the methods of `AttributeMethods::PrimaryKey`
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/schema.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 50f1d9bfe7..8863736943 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -807,16 +807,18 @@ ActiveRecord::Schema.define do t.string :sponsorable_type end - create_table :string_key_objects, id: false, primary_key: :id, force: true do |t| - t.string :id - t.string :name - t.integer :lock_version, null: false, default: 0 + create_table :string_key_objects, id: false, force: true do |t| + t.string :id, null: false + t.string :name + t.integer :lock_version, null: false, default: 0 + t.index :id, unique: true end - create_table :subscribers, force: true, id: false do |t| + create_table :subscribers, force: true do |t| t.string :nick, null: false t.string :name - t.column :books_count, :integer, null: false, default: 0 + t.integer :books_count, null: false, default: 0 + t.integer :update_count, null: false, default: 0 t.index :nick, unique: true end |