Just as a hint:
In my case, the database table yoast_indexable
was created successfully, but the creation of an index was not allowed by the database user. This ended up in a loop that the database table was already created.
[29-Apr-2020 08:29:02 UTC] WordPress database error INDEX command denied to user 'XXX'@'XXX' for table 'wp_yoast_indexable' for query CREATE INDEX <code>object_type_and_sub_type</code> ON <code>wp_yoast_indexable</code>(<code>object_type</code>, <code>object_sub_type</code>) made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, wpseo_init, YoastSEO, Yoast\WP\SEO\Main->load, Yoast\WP\SEO\Loader->load, Yoast\WP\SEO\Loader->load_initializers, Yoast\WP\SEO\Initializers\Migration_Runner->initialize, Yoast\WP\SEO\Initializers\Migration_Runner->run_free_migrations, Yoast\WP\SEO\Initializers\Migration_Runner->run_migrations, YoastSEO_Vendor\Ruckusing_Task_Manager->execute, YoastSEO_Vendor\Task_Db_Migrate->execute, YoastSEO_Vendor\Task_Db_Migrate->prepare_to_migrate, YoastSEO_Vendor\Task_Db_Migrate->run_migrations, WpYoastIndexable->up, WpYoastIndexable->add_table, WpYoastIndexable->add_indexes, YoastSEO_Vendor\Ruckusing_Migration_Base->add_index, Yoast\WP\Lib\Ruckusing_Adapter->add_index, Yoast\WP\Lib\Ruckusing_Adapter->execute_ddl, Yoast\WP\Lib\Ruckusing_Adapter->query, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_WpdbNew->default_query
Solution:
1. Backup your yoast database tables if not already done
2. Grant database user the index right and flush privileges if needed
3. Drop the affected database table, here yoast_indexable
4. All required database tables should be created now successfully.
Cheers,
Matthieu