{"id":124224,"date":"2020-08-05T10:29:01","date_gmt":"2020-08-05T10:29:01","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/primary-key-fixer\/"},"modified":"2021-08-29T07:04:07","modified_gmt":"2021-08-29T07:04:07","slug":"primary-key-fixer","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/primary-key-fixer\/","author":18132920,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3","stable_tag":"trunk","tested":"5.8.13","requires":"5.1","requires_php":"7.2","requires_plugins":"","header_name":"Primary Key Fixer","header_author":"Ole Melhus <ole@on-it.no>","header_description":"Some plugins are missing PRIMARY KEY when creating tables and this causes problems using managed databases. This plugin will use the information from UNIQUE KEY and try to use that.","assets_banners_color":"","last_updated":"2021-08-29 07:04:07","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/omelhus\/wp-pk-fixer\/","header_author_uri":"https:\/\/zpider.io","rating":0,"author_block_rating":0,"active_installs":200,"downloads":3404,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description"],"tags":{"1.0":{"tag":"1.0","author":"omelhus","date":"2020-08-05 10:28:33"},"1.1":{"tag":"1.1","author":"omelhus","date":"2020-08-05 10:38:48"},"1.2":{"tag":"1.2","author":"omelhus","date":"2020-08-18 07:37:40"},"1.3":{"tag":"1.3","author":"omelhus","date":"2021-08-29 07:04:07"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[189181,189182,189180],"plugin_category":[],"plugin_contributors":[189183],"plugin_business_model":[],"class_list":["post-124224","plugin","type-plugin","status-publish","hentry","plugin_tags-digital-ocean","plugin_tags-managed-database","plugin_tags-primary-key","plugin_contributors-omelhus","plugin_committers-omelhus"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/primary-key-fixer.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<p>It will not fix restore where the query includes multiple create table and some of them contains 'primary key'.<\/p>","raw_excerpt":"Plugins like Yoast and Slider Revolution doesn&#039;t create a PRIMARY KEY on tables when they are created. This is an issue when using services like  &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/124224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=124224"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/omelhus"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=124224"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=124224"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=124224"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=124224"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=124224"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=124224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}