Last active
October 21, 2024 21:24
-
-
Save ajaydsouza/be9c6111a06ed550d4fe22cd632810c0 to your computer and use it in GitHub Desktop.
WordPress: Set date columns to be CURRENT_TIMESTAMP
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 `wp_posts` | |
CHANGE `post_date` `post_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
CHANGE `post_date_gmt` `post_date_gmt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
CHANGE `post_modified` `post_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
CHANGE `post_modified_gmt` `post_modified_gmt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment