0

Each time I attempt to import my test server db into my production server, I get the error below:

WordPress database error Table 'adminjsds_wordpress.wp_actionscheduler_actions' doesn't exist for query SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.hook='action_scheduler/migration_hook' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, Action_Scheduler\Migration\Controller->schedule_migration, Action_Scheduler\Migration\Scheduler->is_migration_scheduled, as_next_scheduled_action, ActionScheduler_Store->query_action, ActionScheduler_HybridStore->query_actions, ActionScheduler_DBStore->query_actions WordPress database error Table 'adminjsds_wordpress.wp_actionscheduler_actions' doesn't exist for query SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.hook='action_scheduler/migration_hook' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, Action_Scheduler\Migration\Controller->schedule_migration, Action_Scheduler\Migration\Scheduler->is_migration_scheduled, as_next_scheduled_action, ActionScheduler_Store->query_action, ActionScheduler_HybridStore->query_actions, ActionScheduler_DBStore->query_actions

My question is not specific to the above error. As I get bunches of table related errors when importing / exporting dbs. My question is conceptual.

Question
Is there a reliable way to determine which table was created by which plugin? I can't troubleshoot the error without knowing which plugin is causing it.

Is there any type of "Registry of Tables For Plugins" that can easily determine which table belong to which plugins?

2
  • Did you try googling the error? Took me 30 seconds to ascertain it's from RankMath.
    – vancoder
    Commented Sep 21, 2022 at 19:46
  • 1
    @vancoder you missed the goal of the question.. And you were wrong , it was not from RankMath. It was from Woocommerece. Once I followed the advice of @naha-cosley below, I simply had to deactivate the WooCom drop the tables and reinstall. but thanks for explaining the existence of Google in 2022.
    – mjones
    Commented Sep 22, 2022 at 1:27

2 Answers 2

2

This could be from a number of plugins, including WPForms, RankMath, and Woocommerce — it is the Action Scheduler, something that is included in them, originally made by Woocommerce.

What I'd suggest is, if you are able, search your codebase, especially your plugin files, for an instance of actionscheduler — and see what comes up.

2
  • 1
    This exactly the kind of advice I was looking for. Constantly, web searching, interrupts concentration and workflow. Running a quick grep for a particular string on wp-content light years more efficient. Though I am disappointed that there isn't a "table registry" for plugins... (sounds a great I idea for a new wp plugin)... Thanks again
    – mjones
    Commented Sep 22, 2022 at 1:26
  • Just in case the higher level programmers didn't hear me the first time (A "TABLE REGISTRY" PLUGIN THAT CLARIFIES WHICH TABLE BELONG TO WHICH PLUGIN SEEMS LIKE AN AWESOME DEVELOPMENT PLUGIN IDEA).... :-p
    – mjones
    Commented Sep 24, 2022 at 23:01
2

There is no widely standardized approach to creating plugin tables, and no means to "register" them with WordPress. The most universal solution to discovering which plugin is responsible for a particular table is as @Nabha suggests - to perform a text search across your wp-content directory for the table name (or some substring of it, should it contain any potentially variable prefix or text). Failing that, searching for unique column names from the table in question should yield results.

In this case, the error specifies that the table is missing, which might be the product of some artifact of a plugin which was not properly removed when the plugin was uninstalled. In that case, you may need to resort to Google/GitHub searches for the table name (which is likely a more efficient place to start to begin with).

Not the answer you're looking for? Browse other questions tagged or ask your own question.