chinwagsocial/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb
nullkal 6c54d2e583 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
2017-10-10 13:12:17 +02:00

6 lines
155 B
Ruby

class AddForeignKeyToAccountModerationNotes < ActiveRecord::Migration[5.1]
def change
add_foreign_key :account_moderation_notes, :accounts
end
end