Fix status reactions preventing an on_cascade delete

This commit is contained in:
Jeremy Kescher 2022-12-18 04:23:42 +01:00 committed by fef
parent b9afe72a3a
commit c323642271
Signed by: fef
GPG key ID: EC22E476DC2D3D84

View file

@ -1,10 +1,10 @@
class CreateStatusReactions < ActiveRecord::Migration[6.1] class CreateStatusReactions < ActiveRecord::Migration[6.1]
def change def change
create_table :status_reactions do |t| create_table :status_reactions do |t|
t.references :account, null: false, foreign_key: true t.references :account, null: false, foreign_key: { on_delete: :cascade }
t.references :status, null: false, foreign_key: true t.references :status, null: false, foreign_key: { on_delete: :cascade }
t.string :name, null: false, default: '' t.string :name, null: false, default: ''
t.references :custom_emoji, null: true, foreign_key: true t.references :custom_emoji, null: true, foreign_key: { on_delete: :cascade }
t.timestamps t.timestamps
end end