Chatwoot/db/migrate/20191126185833_update_user_invite_foreign_key.rb

7 lines
215 B
Ruby
Raw Normal View History

class UpdateUserInviteForeignKey < ActiveRecord::Migration[6.0]
def change
remove_foreign_key :users, column: :inviter_id
add_foreign_key :users, :users, column: :inviter_id, on_delete: :nullify
end
end