« first day (2208 days earlier)      last day (3035 days later) » 

14:54
Any database gurus in here? I've got an interesting problem with WordPress database (multisite configuration). Database Tables Lost Indexes? How to Recover?
 
3 hours later…
17:35
@MichaelEcklund do you know how the indexes were lost? How do you know they're gone?
@TomJNowell I decided to "freshen up" my local development copy of the database from the production database. Exporting/DB Replace, etc. Two of the sites in the database didn't update with the DB replace script. So I went to see why... and poof. There's the problem. No indexes on those tables randomly.
I also tried Dashboard -> Updates -> Reinstall // Dashboard -> Updates -> Upgrade Network and that didn't fix it either.
I looked into the update files for WP core... They don't even verify DB integrity. Can you believe that? They offer a "reinstall" feature, but the reinstallation doesn't even check the database at all. lol
If you look at wp-admin/includes/schema.php will get you the schema via wp_get_db_schema(). I was thinking maybe something like dbDelta( wp_get_db_schema() ) ??? idk
Either that or I was thinking about building a custom class which specifically checks the database for indexes. If any are missing, it will readd them.
Think I'm SOL here tho. unfortunately. Lot of work to fix something stupid.
 
2 hours later…
19:33
@TomJNowell Once upon a time though, these sites were all standalone installs. Migrated them all into multisite. They all functioned fine pre-migration and post-migration. So I'm not sure how the indexes disappeared.

« first day (2208 days earlier)      last day (3035 days later) »