[wp-trac] [WordPress Trac] #37984: Relocate either dbDelta() or wp_should_upgrade_global_tables() out of upgrade.php
WordPress Trac
noreply at wordpress.org
Thu Jul 4 00:16:46 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 pento):
Ah, I see what you're after.
Is it an option to hook into `upgrader_process_complete` (which will run
after the plugin is upgraded, but still in the process with the pre-
upgraded code), and then have a `schema.php` file in your plugin that you
can load, to apply the table updates immediately?
Alternatively:
- If it's a manual upgrade:
- Set a flag in your plugin options to run the table upgrade process on
the next page load.
- If it's an auto upgrade:
- Schedule a single cron event to run the upgrade process the next time
cron is fired.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37984#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list