[wp-trac] [WordPress Trac] #37984: Relocate either dbDelta() or wp_should_upgrade_global_tables() out of upgrade.php

WordPress Trac noreply at wordpress.org
Wed Jul 3 06:55:29 UTC 2019


#37984: Relocate either dbDelta() or wp_should_upgrade_global_tables() out of
upgrade.php
-----------------------------+--------------------------
 Reporter:  johnjamesjacoby  |       Owner:  (none)
     Type:  enhancement      |      Status:  closed
 Priority:  low              |   Milestone:
Component:  Database         |     Version:  4.3
 Severity:  minor            |  Resolution:  wontfix
 Keywords:                   |     Focuses:  performance
-----------------------------+--------------------------

Comment (by johnjamesjacoby):

 > folks should hook into the wp_upgrade action, and upgrade their tables
 the same time as Core does

 Erm. Unfortunately for most plugins with their own database tables, this
 is impossible.

 That action only fires when there is a ''core'' upgrade, not when there is
 a ''plugin needing its own'' upgrade, for which there is no equivalent –
 hence why plugins roll their own, hence why there is a need to make these
 functions more accessible.

 Performing a plugin database upgrade on admin_init is not vastly different
 than core running it’s own repair.php redirect to an unauthorized visitor.

 3rd-opinion, possibly? :)

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


More information about the wp-trac mailing list