From 6c54d2e5837de941457371e9afffd05606d88180 Mon Sep 17 00:00:00 2001 From: nullkal Date: Tue, 10 Oct 2017 20:12:17 +0900 Subject: foreign_key, non-nullable, dependent: destroy in account_moderation_notes (#5294) * Add foreign key constraint to column `account` in `account_moderation_notes` * Change account_id and target_account_id to non-nullable in account_moderation_notes * Add dependent: :destroy to account and target_account in account_moderation_notes --- .../20171010023049_add_foreign_key_to_account_moderation_notes.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb (limited to 'db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb') diff --git a/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb b/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb new file mode 100644 index 000000000..fc1e1ab91 --- /dev/null +++ b/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb @@ -0,0 +1,5 @@ +class AddForeignKeyToAccountModerationNotes < ActiveRecord::Migration[5.1] + def change + add_foreign_key :account_moderation_notes, :accounts + end +end -- cgit