diff --git a/db/migrate/20221218015350_fix_foreign_keys_status_reactions.rb b/db/migrate/20221218015350_fix_foreign_keys_status_reactions.rb new file mode 100644 index 0000000000..facd3c3678 --- /dev/null +++ b/db/migrate/20221218015350_fix_foreign_keys_status_reactions.rb @@ -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 diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index f665e446a5..3ff9f78cea 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -25,7 +25,7 @@ module Mastodon end def suffix_version - '+1.1.0' + '+1.1.1' end def to_a