From 653c925beb800b07a493e6915c784ddf936eecc3 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 30 Jun 2021 06:13:55 +0200 Subject: Fix missing on_delete: :cascade for canonical_email_blocks foreign key (#16448) --- db/migrate/20210416200740_create_canonical_email_blocks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/migrate/20210416200740_create_canonical_email_blocks.rb') diff --git a/db/migrate/20210416200740_create_canonical_email_blocks.rb b/db/migrate/20210416200740_create_canonical_email_blocks.rb index a1f1660bf..32c44646c 100644 --- a/db/migrate/20210416200740_create_canonical_email_blocks.rb +++ b/db/migrate/20210416200740_create_canonical_email_blocks.rb @@ -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 -- cgit