You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This attempts to create a unique key on option_id:
Index WP MySQL For Speed 1.4.18
Versions Plugin:1.4.18 MySQL:10.11.7-MariaDB-1:10.11.7+maria~ubu2204 WordPress:6.5.4 WordPress database:57155 php:8.0.30
WordPress database error Duplicate entry '0' for key 'option_id' for query ALTER TABLE `zs_options` ADD UNIQUE KEY option_id (option_id), ADD PRIMARY KEY (option_name), DROP KEY option_name, DROP KEY autoload_2, DROP KEY autoload_3, DROP KEY autoload_4/**imfs-query-tag*394371712*/ 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->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, ImsfCli->enable, ImsfCli->doRekeying, ImfsDb->rekeyTables, ImfsDb->rekeyTable, ImfsDb->query
PHP Fatal error: Uncaught ImfsException: [0]: Duplicate entry '0' for key 'option_id' in ALTER TABLE `zs_options` ADD UNIQUE KEY option_id (option_id), ADD PRIMARY KEY (option_name), DROP KEY option_name, DROP KEY autoload_2, DROP KEY autoload_3, DROP KEY autoload_4/**imfs-query-tag*394371712*/
Looking at my database structure, there seems to be A LOT of options with the option_id=0:
MariaDB > select count(*) from zs_options where option_id=0 \G
*************************** 1. row ***************************
count(*): 922
1 row in set (0.001 sec)
Looking at the entries in zs_options, there seem so be A LOT of different plugins that, over the years, have inserted an option with id=0.
This is a very very old Wordpress install (originating from 19-ish years ago?) .
I'm assuming that somewhere along the lines the _options table has received a auto_increment on the option_id column, but the damage was probably already done so that the schema alteration never took place on this table (because there were always duplicate keys).
The text was updated successfully, but these errors were encountered:
Hello,
While running
This attempts to create a unique key on
option_id
:Looking at my database structure, there seems to be A LOT of options with the
option_id=0
:Looking at the entries in
zs_options
, there seem so be A LOT of different plugins that, over the years, have inserted an option with id=0.This is a very very old Wordpress install (originating from 19-ish years ago?) .
I'm assuming that somewhere along the lines the
_options
table has received aauto_increment
on theoption_id
column, but the damage was probably already done so that the schema alteration never took place on this table (because there were always duplicate keys).The text was updated successfully, but these errors were encountered: