diff --git a/db/migrate/20220714211614_set_on_delete_for_anonymous_blocks.rb b/db/migrate/20220714211614_set_on_delete_for_anonymous_blocks.rb index 52aaf299..627d6af4 100644 --- a/db/migrate/20220714211614_set_on_delete_for_anonymous_blocks.rb +++ b/db/migrate/20220714211614_set_on_delete_for_anonymous_blocks.rb @@ -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 diff --git a/db/migrate/20220714212414_set_on_delete_for_mute_rules.rb b/db/migrate/20220714212414_set_on_delete_for_mute_rules.rb index d4c01c6b..2f2a84f8 100644 --- a/db/migrate/20220714212414_set_on_delete_for_mute_rules.rb +++ b/db/migrate/20220714212414_set_on_delete_for_mute_rules.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 1873247f..dbed8eb9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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