Created
October 17, 2011 16:15
-
-
Save thurloat/1292983 to your computer and use it in GitHub Desktop.
Automated Migrations? For fools!
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
| ALTER TABLE `news_items` DROP COLUMN updated; | |
| ALTER TABLE `news_items` ADD COLUMN updated datetime DEFAULT NULL; | |
| ALTER TABLE `news_items` CHANGE `timestamp` `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; | |
| UPDATE `news_items` as item SET `updated` = item.`timestamp`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment