added the migration to invitation_service and invitation_identifier
This commit is contained in:
parent
d595a64169
commit
a92d5f41c9
1 changed files with 13 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
class AddInvitationServiceAndInvitationIdentifierToUser < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column(:users, :invitation_service, :string)
|
||||
add_column(:users, :invitation_identifier, :string)
|
||||
|
||||
execute("UPDATE `users` SET invitation_service='email', invitation_identifier= email WHERE invitation_token IS NOT NULL;")
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column(:users, :invitation_service, :string)
|
||||
remove_column(:users, :invitation_identifier, :string)
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue