aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-06-07 06:26:49 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-06-07 06:26:49 +0900
commit7b7b7c5ce62e1ede29dad4ae1ce613bd12f8089c (patch)
tree3777a25130dc4900bda49dec0c495ed492165ec7 /activerecord/test/schema
parent16bb3d6f122c32e828a23ba24ffb14d60fdb9ba3 (diff)
downloadrails-7b7b7c5ce62e1ede29dad4ae1ce613bd12f8089c.tar.gz
rails-7b7b7c5ce62e1ede29dad4ae1ce613bd12f8089c.tar.bz2
rails-7b7b7c5ce62e1ede29dad4ae1ce613bd12f8089c.zip
Extract foreign key action from `information_schema`
Fixes #25300.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb15
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|