Fix missing on_delete: :cascade for canonical_email_blocks foreign key (#16448)
This commit is contained in:
parent
7c27ccb8d8
commit
653c925beb
3 changed files with 16 additions and 3 deletions
|
@ -2,7 +2,7 @@ class CreateCanonicalEmailBlocks < ActiveRecord::Migration[6.1]
|
|||
def change
|
||||
create_table :canonical_email_blocks do |t|
|
||||
t.string :canonical_email_hash, null: false, default: '', index: { unique: true }
|
||||
t.belongs_to :reference_account, null: false, foreign_key: { on_cascade: :delete, to_table: 'accounts' }
|
||||
t.belongs_to :reference_account, null: false, foreign_key: { to_table: 'accounts' }
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue