Created
June 3, 2013 05:57
-
-
Save fakechris/5696321 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delimiter # | |
create trigger fix_dot_account_external_ids after insert on account_external_ids | |
for each row | |
begin | |
SET @external_id = NEW.external_id; | |
if @external_id like 'gerrit:*' then | |
SET @new_external_id = REPLACE(@external_id, 'gerrit:', 'username:'); | |
insert into account_external_ids (account_id, email_address, password, external_id) values (new.account_id, new.email_address, new.password, @new_external_id); | |
end if; | |
end# | |
delimiter ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment