Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active January 14, 2021 11:37
Show Gist options
  • Save jchristopher/e18ac495a8bcc592b94551398db2c6d5 to your computer and use it in GitHub Desktop.
Save jchristopher/e18ac495a8bcc592b94551398db2c6d5 to your computer and use it in GitHub Desktop.
Manually add primary keys introduced in SearchWP 4.1
# wp_searchwp_tokens already has a primary key.
ALTER TABLE `wp_searchwp_index` ADD COLUMN `indexid` BIGINT(20) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST;
ALTER TABLE `wp_searchwp_log` ADD COLUMN `logid` BIGINT(20) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST;
ALTER TABLE `wp_searchwp_status` CHANGE `site` `site` BIGINT(20) unsigned NOT NULL COMMENT 'Site ID';
ALTER TABLE `wp_searchwp_status` ADD COLUMN `statusid` BIGINT(20) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment