How to log database changes during an upgrade?

I have WordPress installed in a classic LAMP configuration. Is there any way to, in a protected environment (like staging), automatically log all database changes (i.e. drop indexes or alter tables) done by a WordPress upgrade process?

1 Answer
1

Why would you need to log them? They’re defined in the code itself.

Look at wp-admin/includes/upgrade.php. Every version that changes the DB has a function defined that does the job. The changes made for version 3.4 are defined in the upgrade_340() function. The changes made for 3.3 are defined in the upgrade_330() function. And so on.

Leave a Comment