Created
July 12, 2016 16:33
-
-
Save iolloyd/d04da8e2f21db17ff619af2282bd2be3 to your computer and use it in GitHub Desktop.
Replacing uuids with incremental integers
This file contains hidden or 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
sql_query_pre = SET @x = 0 | |
# Since we have a uuid as an id, we need to swap that out | |
# for an integer | |
sql_query = \ | |
SELECT \ | |
@x := @x + 1 as id, user_id, type, name, email, browser, question, unix_timestamp(created) as created \ | |
FROM \ | |
contacts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment