[Shipper Pro] shipper failing on import of some tables

Hi,

I just imported a website running woo commerce to a staging site, and got the following error when importing a table:

[02-Aug-2019 18:26:33 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'virtual tinyint(1) DEFAULT '0',downloadable tinyint(1) DEFAULT '0',min_price dec' at line 1 for query CREATE TABLE import_tmp_wp_wc_product_meta_lookup (product_id bigint(20) NOT NULL,sku varchar(100) COLLATE utf8mb4_unicode_520_ci DEFAULT '',virtual tinyint(1) DEFAULT '0',downloadable tinyint(1) DEFAULT '0',min_price decimal(10,2) DEFAULT NULL,max_price decimal(10,2) DEFAULT NULL,onsale tinyint(1) DEFAULT '0',stock_quantity double DEFAULT NULL,stock_status varchar(100) COLLATE utf8mb4_unicode_520_ci DEFAULT 'instock',rating_count bigint(20) DEFAULT '0',average_rating decimal(3,2) DEFAULT '0.00',total_sales bigint(20) DEFAULT '0',PRIMARY KEY (product_id),KEY virtual (virtual),KEY downloadable (downloadable),KEY stock_status (stock_status),KEY stock_quantity (stock_quantity),KEY onsale (onsale),KEY min_max_price (min_price,max_price)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci made by do_action('wp_ajax_nopriv_shipper_migration_self_ping'), WP_Hook->do_action, WP_Hook->apply_filters, Shipper_Controller_Runner->json_process_request, Shipper_Controller_Runner_Migration->process_tick, Shipper_Task_Import_All->apply, Shipper_Task_Import_Tables->apply, Shipper_Task_Import_Tables->import_table, Shipper_Model_Database_Table_Import->import_statements, Shipper_Model_Database_Table_Import->import_statement, Shipper_Model_Database_Table_Import->import_statement_insert, Shipper_Model_Database_Table_Import->import_statement_create

It looks to me that virtual is a keyword in mysql so it needs to be inclosed in ” or ” or something. Is this correct? I think this because when I dumped the original database the create statement had ” around around all of the column names, and taking off ” from the virtual column caused an error.

Thanks!

-Michael.

  • Dimitris
    • Support Star

    Hello there Michael

    I’ve just forwarded this to our Second Level Support and Shipper lead developer for further investigation and we’ll keep you posted here as soon as we’ve got some valuable insights.

    Your patience on this is highly appreciated! :slight_smile:

    Thank you,

    Dimitris

  • Panos
    • SLS

    Hi Michael !

    So sorry for delay! Tested importing sites with that table but didn’t have any issues. Can’t be sure with what it is related exactly. I would need to have a closer look on your destination site and do some tests there in order to see what might be causing this.

    In the meantime if you still haven’t migrated the site, you can exclude that table using the following snippet:

    add_filter( 'shipper_path_include_table', function( $include, $table ){

    global $wpdb;

    $excluded_tables = array(
    "{$wpdb->prefix}wc_product_meta_lookup",
    );

    if ( in_array( $table, $excluded_tables ) ) {
    return false;
    }

    return $include;
    }, 20, 2 );

    You can add the above snippet in a mu-plugin about which you can read more here:

    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    You can add it in your child theme’s functions.php file instead if you prefer.

    Once migration is completed, you can export and import that specific table manually using phpMyAdmin.

    If you would like us to have a closer look at your destination site, you can share admin and ftp access privately through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:Subject: “Attn: Panos Lyrakis”

    – Admin login:

    Admin username

    Admin password

    Login url

    – FTP credentials

    host

    username

    password

    (and port if required)

    – link back to this thread for reference

    Kind regards!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.