Chatwoot/db/migrate/20211208085931_update_contact_inbox_foreign_key.rb

13 lines
459 B
Ruby
Raw Normal View History

class UpdateContactInboxForeignKey < ActiveRecord::Migration[6.1]
def change
remove_foreign_key :contact_inboxes, :contacts
add_foreign_key :contact_inboxes, :contacts, on_delete: :cascade
remove_foreign_key :contact_inboxes, :inboxes
add_foreign_key :contact_inboxes, :inboxes, on_delete: :cascade
remove_foreign_key :conversations, :contact_inboxes
add_foreign_key :conversations, :contact_inboxes, on_delete: :cascade
end
end