Remove foreign key constraints from anon blocks & mute rules
We do it this way on other tables. Rails validates these on its own anyway.
This commit is contained in:
parent
e1e45b04a3
commit
aa04134785
|
@ -3,8 +3,8 @@
|
|||
class SetOnDeleteForAnonymousBlocks < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
change_table :anonymous_blocks do |t|
|
||||
t.foreign_key :users, on_delete: :cascade
|
||||
t.foreign_key :questions, on_delete: :cascade
|
||||
t.remove_foreign_key :users
|
||||
t.remove_foreign_key :questions
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class SetOnDeleteForMuteRules < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
change_table :mute_rules do |t|
|
||||
t.foreign_key :users, on_delete: :cascade
|
||||
t.remove_foreign_key :users
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -324,8 +324,5 @@ ActiveRecord::Schema.define(version: 2022_07_14_212414) do
|
|||
t.index ["user_id"], name: "index_users_roles_on_user_id"
|
||||
end
|
||||
|
||||
add_foreign_key "anonymous_blocks", "questions", on_delete: :cascade
|
||||
add_foreign_key "anonymous_blocks", "users", on_delete: :cascade
|
||||
add_foreign_key "mute_rules", "users", on_delete: :cascade
|
||||
add_foreign_key "profiles", "users"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue