Primary Key Fixer

Plugins like Yoast and Slider Revolution doesn't create a PRIMARY KEY on tables when they…

Author:Ole Melhus (profile at wordpress.org)
WordPress version required:5.1
WordPress version tested:5.8
Plugin version:1.3
Added to WordPress repository:05-08-2020
Last updated:29-08-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://github.com/omelhus/wp-pk-fixer/
Total downloads:1 302
Active installs:100+
plugin download
Click to start download

Plugins like Yoast and Slider Revolution doesn’t create a PRIMARY KEY on tables when they are created. This is an issue when using services like Digital Ocean managed databases etc that uses replication and requires primary keys.

By installing this plugin it will add a query filter and look for queries that include CREATE TABLE and UNIQUE KEY, but not PRIMARY KEY, and insert a PRIMARY KEY for the same field as the UNIQUE KEY.

It will not fix restore where the query includes multiple create table and some of them contains ‘primary key’.