• Resolved emergencyscotch

    (@emergencyscotch)


    This has already been brought up and it was never resolved: https://wordpress.org/support/topic/primary-key-for-wp_smush_dir_images-table/

    Rather than just closing the issue, this problem should be addressed.

    Not having a primary key in is not considered best practice for MySQL 8, and in fact can cause data loss and problems with database replication.

    As such, it is now a strict requirement on many cloud providers who use scaling & replication, Digital Ocean being one of them.

    Please address this issue by ensuring all tables have primary keys in them.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @emergencyscotch

    I hope you are doing well.

    We reported this situation to our developers for a further check, but as our developer confirmed from that other ticket it should not have negative side effects from this, but we pinged them to check further about MySQL 8 and cloud providers.

    We will keep you updated once hearing back from the developers.

    Best Regards
    Patrick Freitas

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @emergencyscotch

    I hope you are doing well.

    I would like to update you that it was tasked to our developers and we are going to apply the improvement to the plugin.

    If you need to set it for now you can use the below script on your functions.php

    add_action('init', function(){
    	if( isset( $_GET['set-primary-key'] ) ) {
    		global $wpdb;
    		$wpdb->query("ALTER TABLE {$wpdb->base_prefix}smush_dir_images ADD PRIMARY KEY (id);");
    		wp_die('done, you can remove the snippet code now!');
    	}
    });

    Then access once yoursite.com?set-primary-key to set it, once done you can remove the script.

    Best Regards
    Patrick Freitas

    Thread Starter emergencyscotch

    (@emergencyscotch)

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Primary key missi8ng on wp_smush_dir_images’ is closed to new replies.