Last active
June 28, 2020 11:07
-
-
Save onebelarusianguy/3212ea047ad6134276c36c705aad469f to your computer and use it in GitHub Desktop.
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
| # to avoid #1067 - Invalid default value for 'post_date' ERROR: | |
| SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | |
| SET AUTOCOMMIT = 0; | |
| START TRANSACTION; | |
| SET time_zone = "+00:00"; | |
| # then remove INDEX: | |
| ALTER TABLE wp_posts DROP INDEX post_type_post_title; | |
| # show MySQL indexes | |
| SHOW INDEX FROM wp_posts; | |
| # add index | |
| CREATE FULLTEXT INDEX post_content ON wp_posts(post_content); | |
| # less rows in this order | |
| CREATE INDEX views_post_type ON wp_posts(views, post_type); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment