Skip to content

CREATE INDEX and ALTER TABLE not working correctly? #39

Open
@mdbraber

Description

@mdbraber

I'm trying to install the Yoast plugin (latest version 20.8) on a SQLite-enabled Wordpress 6.2.2 blog. I'm getting loads of errors, e.g. these below when trying to reset the indexable tables with the Yoast Test plugin. I'm curious as I spotted some messages by @aristath over on the Yoast github making me think that this plugin is supposed to work with SQlite. Is there anything I'm missing here?

"NOTICE: PHP message: WordPress database error <div style="clear:both">&nbsp;</div>"
"<div class="queries" style="clear:both;margin-bottom:2px;border:red dotted thin;">"
"<p>MySQL query:</p>"
"<p>CREATE INDEX `indexable_link_direction` ON `wp_yoast_seo_links`(`indexable_id`, `type`)</p>"
"<p>Queries made or created this session were:</p>"
"<ol>"
"<li>Executing: SAVEPOINT LEVEL1 | (no parameters)</li>"
"<li>Executing: ROLLBACK TO SAVEPOINT LEVEL1 | (no parameters)</li>"
"</ol>"
"</div>"
"<div style="clear:both;margin-bottom:2px;border:red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">"
"Error occurred at line 3378 in Function <code>handle_error</code>. Error message was: Unknown create type: INDEX."
"</div>"
"<p>Backtrace:</p>"
"<pre>#0 /var/www/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php(289): WP_SQLite_Translator->get_error_message()"

and

" for query ALTER TABLE `wp_yoast_indexable` ADD `created_at` datetime made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/wordpress-seo/wp-seo.php'), require_once('/plugins/wordpress-seo/wp-seo-main.php'), YoastSEO, Yoast\WP\Lib\Abstract_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, Yoast\WP\SEO\Initializers\Migration_Runner->run_migration, Yoast\WP\SEO\Config\Migrations\WpYoastIndexable->up, Yoast\WP\SEO\Config\Migrations\WpYoastIndexable->add_..."
"NOTICE: PHP message: WordPress database error <div style="clear:both">&nbsp;</div>"
"<div class="queries" style="clear:both;margin-bottom:2px;border:red dotted thin;">"
"<p>MySQL query:</p>"
"<p>ALTER TABLE `wp_yoast_indexable` ADD `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP</p>"
"<p>Queries made or created this session were:</p>"
"<ol>"
"<li>Executing: SAVEPOINT LEVEL1 | (no parameters)</li>"
"<li>Executing: ROLLBACK TO SAVEPOINT LEVEL1 | (no parameters)</li>"
"</ol>"
"</div>"
"<div style="clear:both;margin-bottom:2px;border:red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">"
"Error occurred at line 3378 in Function <code>handle_error</code>. Error message was: Unknown operation: ADD."
"</div>"
"<p>Backtrace:</p>"
"<pre>#0 /var/www/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php(289): WP_SQLite_Translator->get_error_message()"
"#1 /var/www/wp-content/plugins/wordpress-seo/lib/migrations/adapter.php(305): WP_SQLite_DB->query()"
"#2 /var/www/wp-content/plugins/wordpress-seo/lib/migrations/adapter.php(360): Yoast\WP\Lib\Migrations\Adapter->query()"
"#3 /var/www/wp-content/plugins/wordpress-seo/lib/migrations/adapter.php(455): Yoast\WP\Lib\Migrations\Adapter->execute_ddl()"
"#10 /var/www/wp-content/plugins/wordpress-seo/src/loader.php(198): Yoast\WP\SEO\Initializers\Migration_Runner->initialize()"
"#11 /var/www/wp-content/plugins/wordpress-seo/src/loader.php(133): Yoast\WP\SEO\Loader->load_initializers()"
"#12 /var/www/wp-content/plugins/wordpress-seo/lib/abstract-main.php(51): Yoast\WP\SEO\Loader->load()"
"#13 /var/www/wp-content/plugins/wordpress-seo/src/functions.php(36): Yoast\WP\Lib\Abstract_Main->load()"
"#14 /var/www/wp-content/plugins/wordpress-seo/wp-seo-main.php(433): YoastSEO()"
"#15 /var/www/wp-content/plugins/wordpress-seo/wp-seo.php(50): require_once('...')"
"#16 /usr/src/wordpress/wp-settings.php(453): include_once('...')"
"#17 /usr/src/wordpress/wp-config.php(21): require_once('...')"
"#18 /usr/src/wordpress/wp-load.php(50): require_once('...')"
"#19 /usr/src/wordpress/wp-admin/admin.php(34): require_once('...')"
"#20 /usr/src/wordpress/wp-admin/tools.php(40): require_once('...')"
"#21 {main}</pre>"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions