db: Create limited varchar to be able to add index.
This commit is contained in:
parent
8bdc3ec35a
commit
e63b605b2a
1 changed files with 2 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
class AddUniqueIndexOnInvitationServiceAndInvitationIdentifierToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column(:users, :invitation_service, :string, :limit => 127)
|
||||
change_column(:users, :invitation_identifier, :string, :limit => 127)
|
||||
add_index(:users, [:invitation_service, :invitation_identifier], :unique => true)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue