diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-12 07:42:46 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-02-07 14:21:18 +0900 |
commit | 14db455156cf822f1af738f24528200ae19efc1c (patch) | |
tree | b09bd7c9f81bee4938c116cdc7b2baa83948fb2f /activerecord/test/schema | |
parent | 968e66b5df92e5ae88c033dc552e17b4c736874b (diff) | |
download | rails-14db455156cf822f1af738f24528200ae19efc1c.tar.gz rails-14db455156cf822f1af738f24528200ae19efc1c.tar.bz2 rails-14db455156cf822f1af738f24528200ae19efc1c.zip |
`primary_key` and `references` columns should be identical type
Follow up to #26266.
The default type of `primary_key` and `references` were changed to
`bigint` since #26266. But legacy migration and sqlite3 adapter should
keep its previous behavior.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/schema.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 4c31548fff..08ff0336b9 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -54,8 +54,8 @@ ActiveRecord::Schema.define do create_table :authors, force: true do |t| t.string :name, null: false - t.bigint :author_address_id - t.integer :author_address_extra_id + t.references :author_address + t.references :author_address_extra t.string :organization_id t.string :owned_essay_id end @@ -88,7 +88,7 @@ ActiveRecord::Schema.define do end create_table :books, force: true do |t| - t.integer :author_id + t.references :author t.string :format t.column :name, :string t.column :status, :integer, default: 0 @@ -306,7 +306,7 @@ ActiveRecord::Schema.define do end create_table :engines, force: true do |t| - t.bigint :car_id + t.references :car, index: false end create_table :entrants, force: true do |t| @@ -664,8 +664,8 @@ ActiveRecord::Schema.define do end create_table :posts, force: true do |t| - t.integer :author_id - t.string :title, null: false + t.references :author + t.string :title, null: false # use VARCHAR2(4000) instead of CLOB datatype as CLOB data type has many limitations in # Oracle SELECT WHERE clause which causes many unit test failures if current_adapter?(:OracleAdapter) |