[wp-trac] [WordPress Trac] #49188: Add a check for tables structures.

WordPress Trac noreply at wordpress.org
Tue Jan 14 22:29:14 UTC 2020


#49188: Add a check for tables structures.
------------------------------------------------+--------------------------
 Reporter:  xkon                                |       Owner:  (none)
     Type:  enhancement                         |      Status:  new
 Priority:  normal                              |   Milestone:  Awaiting
                                                |  Review
Component:  Site Health                         |     Version:
 Severity:  normal                              |  Resolution:
 Keywords:  2nd-opinion dev-feedback has-patch  |     Focuses:
------------------------------------------------+--------------------------
Changes (by xkon):

 * keywords:  2nd-opinion dev-feedback => 2nd-opinion dev-feedback has-patch


Comment:

 [attachment:"49188.diff"] makes a first pass on a possible way of
 introducing a check for Site Health as described in the description of
 this ticket.

 I added the single-site tables for the time being as I was creating the
 patch there but we can easily expand the `$serialized_tables` for
 Multisite & subsite support as well as needed.

 I wasn't really sure if I could somehow parse the existing schema from
 somewhere (i.e. `wp_get_db_schema`)  to be honest so I chose to "re-add"
 an array of the structures but serialized for easier validation, which
 means that if we choose this way this array should also be updated on any
 base DB changes.

 I haven't given much attention to wording at the moment but a quick
 preview can be seen on [attachment:"49188_is_critical.jpg"] &
 [attachment:"49188_passing.jpg"] depending on the results.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49188#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list