2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 00:06:56 -04:00
|
|
|
class RemoveUniqueConstraintFromInvitesIndex < ActiveRecord::Migration[4.2]
|
2014-07-29 13:57:08 -04:00
|
|
|
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
|