discourse/db/migrate/20140729092525_remove_unique_constraint_from_invites_index.rb

11 lines
339 B
Ruby

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