discourse/db/migrate/20140729092525_remove_uniqu...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
371 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class RemoveUniqueConstraintFromInvitesIndex < ActiveRecord::Migration[4.2]
def up
remove_index :invites, %i[email invited_by_id]
add_index :invites, %i[email invited_by_id], unique: false
end
def down
remove_index :invites, %i[email invited_by_id]
add_index :invites, %i[email invited_by_id], unique: true
end
end