Skip to content
Extraits de code Groupes Projets
Valider 48392e71 rédigé par Benjamin Neff's avatar Benjamin Neff
Parcourir les fichiers

migration for old invitation-emails

parent 92c799f6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
class RemoveInvitationEmailFromUsers < ActiveRecord::Migration
def self.up
execute <<-SQL
UPDATE users
SET email = concat('invitemail_', id, '@example.org')
WHERE invitation_token IS NOT NULL
SQL
end
def self.down
execute <<-SQL
UPDATE users
SET email = (SELECT identifier FROM invitations WHERE invitations.recipient_id = users.id)
WHERE invitation_token IS NOT NULL
SQL
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120322223517) do
ActiveRecord::Schema.define(:version => 20120328025842) do
create_table "account_deletions", :force => true do |t|
t.string "diaspora_handle"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter