diff options
author | Eileen M. Uchitelle <eileencodes@gmail.com> | 2016-07-01 11:30:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 11:30:40 -0400 |
commit | 4abd389ef77cf8f8b45793451c6d4429ca08062e (patch) | |
tree | 89930d89f7a22d07010207d78721ff136b782c17 /activerecord/test/schema/schema.rb | |
parent | 297e262035ce9dce9c33f8bebc778f36760a5e40 (diff) | |
parent | 7b7b7c5ce62e1ede29dad4ae1ce613bd12f8089c (diff) | |
download | rails-4abd389ef77cf8f8b45793451c6d4429ca08062e.tar.gz rails-4abd389ef77cf8f8b45793451c6d4429ca08062e.tar.bz2 rails-4abd389ef77cf8f8b45793451c6d4429ca08062e.zip |
Merge pull request #25307 from kamipo/extract_foreign_key_action_from_information_schema
Extract foreign key action from `information_schema`
Diffstat (limited to 'activerecord/test/schema/schema.rb')
-rw-r--r-- | activerecord/test/schema/schema.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 628a59c2e3..2f2993ce18 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -409,6 +409,14 @@ ActiveRecord::Schema.define do t.references :student end + create_table :students, force: true do |t| + t.string :name + t.boolean :active + t.integer :college_id + end + + add_foreign_key :lessons_students, :students, on_delete: :cascade + create_table :lint_models, force: true create_table :line_items, force: true do |t| @@ -777,12 +785,6 @@ ActiveRecord::Schema.define do t.integer :lock_version, null: false, default: 0 end - create_table :students, force: true do |t| - t.string :name - t.boolean :active - t.integer :college_id - end - create_table :subscribers, force: true, id: false do |t| t.string :nick, null: false t.string :name @@ -1002,7 +1004,6 @@ ActiveRecord::Schema.define do end add_foreign_key :fk_test_has_fk, :fk_test_has_pk, column: "fk_id", name: "fk_name", primary_key: "pk_id" - add_foreign_key :lessons_students, :students end create_table :overloaded_types, force: true do |t| |