[wp-trac] [WordPress Trac] #62994: Add a site health check for global table schemas

WordPress Trac noreply at wordpress.org
Thu Feb 20 16:26:38 UTC 2025


#62994: Add a site health check for global table schemas
-------------------------+-----------------------------
 Reporter:  johnbillion  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Site Health  |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-----------------------------
 The intention of the `DO_NOT_UPGRADE_GLOBAL_TABLES` constant is to allow a
 site owner to defer potentially expensive schema or value updates to
 tables that are considered global to a network (although this doesn't only
 affect Multisite networks).

 Quoting [https://developer.wordpress.org/advanced-administration/wordpress
 /wp-config/#do-not-upgrade-global-tables the developer.wordpress.org page
 on this topic]:

 > Since an ALTER, or an unbounded DELETE or UPDATE, can take a long time
 to complete, large sites usually want to avoid these being run as part of
 the upgrade so they can handle it themselves.

 During [https://core.trac.wordpress.org/ticket/21022#comment:223 recent
 discussion on #21022] it was discovered that wordpress.org has never
 applied the `wp_users` table schema upgrade made in WordPress 4.4 over
 nine years ago. This is definitely a situation we want to avoid happening
 in the future as it risks delaying future enhancements both to schemas
 themselves and to data stored in the database.

 The `DO_NOT_UPGRADE_GLOBAL_TABLES` constant should facilitate deferring a
 schema change rather than never making it, so let's introduce a site
 health check which flags outdated table schemas as critical issues.

 Some schema changes can be found by looking for calls to
 `wp_should_upgrade_global_tables()` but others will need to be found by
 looking at the svn/git history of the `wp_get_db_schema()` function.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62994>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list