forked from mirrors/catstodon
Fix status reactions preventing an on_cascade delete
This commit is contained in:
parent
3c0af10676
commit
eded36676f
2 changed files with 16 additions and 1 deletions
|
@ -0,0 +1,15 @@
|
|||
class FixForeignKeysStatusReactions < ActiveRecord::Migration[6.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
remove_foreign_key :status_reactions, :accounts
|
||||
add_foreign_key :status_reactions, :accounts, on_delete: :cascade, validate: false
|
||||
validate_foreign_key :status_reactions, :accounts
|
||||
remove_foreign_key :status_reactions, :statuses
|
||||
add_foreign_key :status_reactions, :statuses, on_delete: :cascade, validate: false
|
||||
validate_foreign_key :status_reactions, :statuses
|
||||
remove_foreign_key :status_reactions, :custom_emojis
|
||||
add_foreign_key :status_reactions, :custom_emojis, on_delete: :cascade, validate: false
|
||||
validate_foreign_key :status_reactions, :custom_emojis
|
||||
end
|
||||
end
|
|
@ -25,7 +25,7 @@ module Mastodon
|
|||
end
|
||||
|
||||
def suffix_version
|
||||
'+1.1.0'
|
||||
'+1.1.1'
|
||||
end
|
||||
|
||||
def to_a
|
||||
|
|
Loading…
Reference in a new issue