Created
April 11, 2010 21:27
-
-
Save DasBlub/363079 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
ALTER TABLE characters ADD deleteDate_tmp TIMESTAMP NULL DEFAULT NULL; -- add temp field | |
UPDATE characters SET deleteDate_tmp = deleteDate; -- set the value of the temp field | |
ALTER TABLE characters DROP deleteDate; -- drop the original field | |
ALTER TABLE characters ADD deleteDate BIGINT(20) NULL DEFAULT NULL; -- add bigint(20) for the unix timestamp | |
UPDATE characters SET deleteDate = UNIX_TIMESTAMP(deleteDate_tmp); -- set the unix timestamp | |
ALTER TABLE characters DROP deleteDate_tmp; -- drop the temp field |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment