File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change
1
+ class AddOnCascadeDeleteOnComments < ActiveRecord ::Migration [ 7.0 ]
2
+ def change
3
+ remove_foreign_key :comments , :users
4
+ add_foreign_key :comments , :users , on_delete : :nullify
5
+ end
6
+ end
Original file line number Diff line number Diff line change 10
10
#
11
11
# It's strongly recommended that you check this file into your version control system.
12
12
13
- ActiveRecord ::Schema [ 7.0 ] . define ( version : 2023_09_14_120530 ) do
13
+ ActiveRecord ::Schema [ 7.0 ] . define ( version : 2024_02_16_103644 ) do
14
14
# These are extensions that must be enabled in order to support this database
15
15
enable_extension "plpgsql"
16
16
218
218
add_foreign_key "answers" , "pias"
219
219
add_foreign_key "attachments" , "pias"
220
220
add_foreign_key "comments" , "pias"
221
- add_foreign_key "comments" , "users"
221
+ add_foreign_key "comments" , "users" , on_delete : :nullify
222
222
add_foreign_key "evaluations" , "pias"
223
223
add_foreign_key "knowledges" , "knowledge_bases"
224
224
add_foreign_key "measures" , "pias"
You can’t perform that action at this time.
0 commit comments