diff --git a/db/migrate/20240216103644_add_on_cascade_delete_on_comments.rb b/db/migrate/20240216103644_add_on_cascade_delete_on_comments.rb index 484f2585..bb3d69ab 100644 --- a/db/migrate/20240216103644_add_on_cascade_delete_on_comments.rb +++ b/db/migrate/20240216103644_add_on_cascade_delete_on_comments.rb @@ -1,6 +1,6 @@ class AddOnCascadeDeleteOnComments < ActiveRecord::Migration[7.0] def change remove_foreign_key :comments, :users - add_foreign_key :comments, :users, on_delete: :cascade + add_foreign_key :comments, :users, on_delete: :nullify end end diff --git a/db/schema.rb b/db/schema.rb index ecdd9cdc..fb75efdf 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -218,7 +218,7 @@ add_foreign_key "answers", "pias" add_foreign_key "attachments", "pias" add_foreign_key "comments", "pias" - add_foreign_key "comments", "users", on_delete: :cascade + add_foreign_key "comments", "users", on_delete: :nullify add_foreign_key "evaluations", "pias" add_foreign_key "knowledges", "knowledge_bases" add_foreign_key "measures", "pias"