“#1067 – Invalid default value for ‘post_date’” when trying to reset AI after backup

I’ve restored my WordPress database from an sql backup. However, in doing so, all of the tables have lost auto increment.

When I try to add it back in with this sql

ALTER TABLE `mercury_posts` CHANGE `ID` `ID` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;

I get the error #1067 - Invalid default value for 'post_date'. How do I fix this?

Read more here: “#1067 – Invalid default value for ‘post_date’” when trying to reset AI after backup

Leave a Reply

Your email address will not be published. Required fields are marked *