• Resolved KoolPal

    (@koolpal007)


    Hi,

    Upon restore, I am seeing the below errors in debug.log

    I have tried this with versions

    1.24.1 – 21/Feb/2024 and 1.23.16 – 23/Dec/2023

    I followed the steps suggested here – https://updraftplus.com/forums/topic/problem-migrating-a-site/#post-301937

    When I am restoring the database last, I see the below errors in debug.log

    [01-Mar-2024 01:57:30 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_digits_mobile_otp' for query SELECT COUNT(*) FROM wp_digits_mobile_otp USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:30 UTC] WordPress database error Key 'mobileno' doesn't exist in table 'wp_digits_mobile_otp' for query SELECT COUNT(*) FROM wp_digits_mobile_otp USE INDEX (mobileno) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:49 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_rs_expiredpoints_email' for query SELECT COUNT(*) FROM wp_rs_expiredpoints_email USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:49 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_rs_templates_email' for query SELECT COUNT(*) FROM wp_rs_templates_email USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:49 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_rsgiftvoucher' for query SELECT COUNT(*) FROM wp_rsgiftvoucher USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:50 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_rspointexpiry' for query SELECT COUNT(*) FROM wp_rspointexpiry USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:50 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_rsrecordpoints' for query SELECT COUNT(*) FROM wp_rsrecordpoints USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:50 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_sumo_reward_encashing_submitted_data' for query SELECT COUNT(*) FROM wp_sumo_reward_encashing_submitted_data USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    
    [01-Mar-2024 01:57:51 UTC] WordPress database error Key 'PRIMARY' doesn't exist in table 'wp_sumo_reward_send_point_submitted_data' for query SELECT COUNT(*) FROM wp_sumo_reward_send_point_submitted_data USE INDEX (PRIMARY) made by do_action('wp_ajax_updraft_ajaxrestore'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action('updraftplus_restored_db_table'), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer
    

    Please guide.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support vupdraft

    (@vupdraft)

    This is just telling you that some of your tables don’t have a Primary key. This would be something to talk to the plugins development team about.

    Thread Starter KoolPal

    (@koolpal007)

    @vupdraft Thank you for you reply.

    I have been using these plugins since long and earlier restores using Updraft did NOT display such errors.

    Please guide.

    Thanks

    Plugin Author David Anderson

    (@davidanderson)

    UpdraftPlus searches for a primary key because if there is one, certain things can be done faster. If there isn’t one, that’s not a problem. This code hasn’t always been there. If you can point us to where to find one or more of these plugins that the mentioned database tables are for, we can read the code to see if they do indeed have a primary key on the table or not.

    Thread Starter KoolPal

    (@koolpal007)

    Thank you for responding.

    Both these plugins are commercials plugins.

    https://codecanyon.net/item/digits-wordpress-mobile-number-signup-and-login/19801105

    https://codecanyon.net/item/sumo-reward-points-woocommerce-reward-system/7791451

    Is there any way I can check if these tables have a primary key on the table or not?

    If they do not, how can I add them myself and will it negatively impact their performance?

    Please guide.

    Thanks

    Plugin Support vupdraft

    (@vupdraft)

    To check the structure of your table, you can use the?SHOW CREATE TABLE?command. This will show you the column names, data types, and other information about the table including the primary key. You can also use the?SHOW INDEXES?command to see the indexes created by MySQL.

    If UpdraftPlus is telling you that you do not have a Primary key then it’s very unlikely that it has a Primary key. If it’s not causing you any other issues I would not risk altering the DB. I would however reach out the plugins support and raise this with them

    Thread Starter KoolPal

    (@koolpal007)

    Thank you for your response.

    Have a nice day!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Restore – WordPress database error Key ‘PRIMARY’ doesn’t exist in table’ is closed to new replies.