Created
June 8, 2012 16:53
-
-
Save ayax79/2896843 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
# | |
# Migration to convert the posts.user_id from an internal id pointing to users.id columnt to be the external | |
# serv guid. | |
# | |
# This migration was introduced as part of the user_rewrite work to remove the manage users table reliance and double writing to serv | |
# | |
UP: | |
query: | |
1: ALTER TABLE posts MODIFY user_id varchar(40) | |
2: UPDATE posts LEFT JOIN users ON posts.user_id=users.id SET posts.user_id=users.core_user_guid; | |
DOWN: | |
query: | |
1: select 'no down' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment