HI @roxymathew,
I had a local version with the right tables in database. I have copied manually the tables and the problem disappeared.
This is the SQL…hope can help you:
CREATE TABLE IF NOT EXISTS wp_wc_admin_notes (
note_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
type varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
locale varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
title longtext COLLATE utf8mb4_unicode_ci NOT NULL,
content longtext COLLATE utf8mb4_unicode_ci NOT NULL,
icon varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
content_data longtext COLLATE utf8mb4_unicode_ci,
status varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
source varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_reminder datetime DEFAULT NULL,
is_snoozable tinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (note_id)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_admin_note_actions (
action_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
note_id bigint(20) unsigned NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
label varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
query longtext COLLATE utf8mb4_unicode_ci NOT NULL,
status varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
is_primary tinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (action_id),
KEY note_id (note_id)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_category_lookup (
category_tree_id bigint(20) unsigned NOT NULL,
category_id bigint(20) unsigned NOT NULL,
PRIMARY KEY (category_tree_id,category_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_customer_lookup (
customer_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
user_id bigint(20) unsigned DEFAULT NULL,
username varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
first_name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
last_name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
email varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
date_last_active timestamp NULL DEFAULT NULL,
date_registered timestamp NULL DEFAULT NULL,
country char(2) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
postcode varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
city varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
state varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
PRIMARY KEY (customer_id),
UNIQUE KEY user_id (user_id),
KEY email (email)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_download_log (
download_log_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
timestamp datetime NOT NULL,
permission_id bigint(20) unsigned NOT NULL,
user_id bigint(20) unsigned DEFAULT NULL,
user_ip_address varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
PRIMARY KEY (download_log_id),
KEY permission_id (permission_id),
KEY timestamp (timestamp),
CONSTRAINT fk_wp_wc_download_log_permission_id FOREIGN KEY (permission_id) REFERENCES wp_woocommerce_downloadable_product_permissions (permission_id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_order_coupon_lookup (
order_id bigint(20) unsigned NOT NULL,
coupon_id bigint(20) unsigned NOT NULL,
date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
discount_amount double NOT NULL DEFAULT ‘0’,
PRIMARY KEY (order_id,coupon_id),
KEY coupon_id (coupon_id),
KEY date_created (date_created)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_order_product_lookup (
order_item_id bigint(20) unsigned NOT NULL,
order_id bigint(20) unsigned NOT NULL,
product_id bigint(20) unsigned NOT NULL,
variation_id bigint(20) unsigned NOT NULL,
customer_id bigint(20) unsigned DEFAULT NULL,
date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
product_qty int(11) NOT NULL,
product_net_revenue double NOT NULL DEFAULT ‘0’,
product_gross_revenue double NOT NULL DEFAULT ‘0’,
coupon_amount double NOT NULL DEFAULT ‘0’,
tax_amount double NOT NULL DEFAULT ‘0’,
shipping_amount double NOT NULL DEFAULT ‘0’,
shipping_tax_amount double NOT NULL DEFAULT ‘0’,
PRIMARY KEY (order_item_id),
KEY order_id (order_id),
KEY product_id (product_id),
KEY customer_id (customer_id),
KEY date_created (date_created)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_order_stats (
order_id bigint(20) unsigned NOT NULL,
parent_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_created_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
num_items_sold int(11) NOT NULL DEFAULT ‘0’,
total_sales double NOT NULL DEFAULT ‘0’,
tax_total double NOT NULL DEFAULT ‘0’,
shipping_total double NOT NULL DEFAULT ‘0’,
net_total double NOT NULL DEFAULT ‘0’,
returning_customer tinyint(1) DEFAULT NULL,
status varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
customer_id bigint(20) unsigned NOT NULL,
PRIMARY KEY (order_id),
KEY date_created (date_created),
KEY customer_id (customer_id),
KEY status (status(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_order_tax_lookup (
order_id bigint(20) unsigned NOT NULL,
tax_rate_id bigint(20) unsigned NOT NULL,
date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
shipping_tax double NOT NULL DEFAULT ‘0’,
order_tax double NOT NULL DEFAULT ‘0’,
total_tax double NOT NULL DEFAULT ‘0’,
PRIMARY KEY (order_id,tax_rate_id),
KEY tax_rate_id (tax_rate_id),
KEY date_created (date_created)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_product_meta_lookup (
product_id bigint(20) NOT NULL,
sku varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
virtual tinyint(1) DEFAULT ‘0’,
downloadable tinyint(1) DEFAULT ‘0’,
min_price decimal(19,4) DEFAULT NULL,
max_price decimal(19,4) DEFAULT NULL,
onsale tinyint(1) DEFAULT ‘0’,
stock_quantity double DEFAULT NULL,
stock_status varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ‘instock’,
rating_count bigint(20) DEFAULT ‘0’,
average_rating decimal(3,2) DEFAULT ‘0.00’,
total_sales bigint(20) DEFAULT ‘0’,
tax_status varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ‘taxable’,
tax_class varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
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_ci;
CREATE TABLE IF NOT EXISTS wp_wc_tax_rate_classes (
tax_rate_class_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
slug varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
PRIMARY KEY (tax_rate_class_id),
UNIQUE KEY slug (slug(191))
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_wc_webhooks (
webhook_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
status varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
name text COLLATE utf8mb4_unicode_ci NOT NULL,
user_id bigint(20) unsigned NOT NULL,
delivery_url text COLLATE utf8mb4_unicode_ci NOT NULL,
secret text COLLATE utf8mb4_unicode_ci NOT NULL,
topic varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_created_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_modified datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_modified_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
api_version smallint(4) NOT NULL,
failure_count smallint(10) NOT NULL DEFAULT ‘0’,
pending_delivery tinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (webhook_id),
KEY user_id (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_api_keys (
key_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
user_id bigint(20) unsigned NOT NULL,
description varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
permissions varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
consumer_key char(64) COLLATE utf8mb4_unicode_ci NOT NULL,
consumer_secret char(43) COLLATE utf8mb4_unicode_ci NOT NULL,
nonces longtext COLLATE utf8mb4_unicode_ci,
truncated_key char(7) COLLATE utf8mb4_unicode_ci NOT NULL,
last_access datetime DEFAULT NULL,
PRIMARY KEY (key_id),
KEY consumer_key (consumer_key),
KEY consumer_secret (consumer_secret)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_attribute_taxonomies (
attribute_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
attribute_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
attribute_label varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
attribute_type varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
attribute_orderby varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
attribute_public int(1) NOT NULL DEFAULT ‘1’,
PRIMARY KEY (attribute_id),
KEY attribute_name (attribute_name(20))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_downloadable_product_permissions (
permission_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
download_id varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
product_id bigint(20) unsigned NOT NULL,
order_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
order_key varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
user_email varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
user_id bigint(20) unsigned DEFAULT NULL,
downloads_remaining varchar(9) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
access_granted datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
access_expires datetime DEFAULT NULL,
download_count bigint(20) unsigned NOT NULL DEFAULT ‘0’,
PRIMARY KEY (permission_id),
KEY download_order_key_product (product_id,order_id,order_key(16),download_id),
KEY download_order_product (download_id,order_id,product_id),
KEY order_id (order_id),
KEY user_order_remaining_expires (user_id,order_id,downloads_remaining,access_expires)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_log (
log_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
timestamp datetime NOT NULL,
level smallint(4) NOT NULL,
source varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
message longtext COLLATE utf8mb4_unicode_ci NOT NULL,
context longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (log_id),
KEY level (level)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_order_itemmeta (
meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
order_item_id bigint(20) unsigned NOT NULL,
meta_key varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
meta_value longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (meta_id),
KEY order_item_id (order_item_id),
KEY meta_key (meta_key(32))
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_order_items (
order_item_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
order_item_name text COLLATE utf8mb4_unicode_ci NOT NULL,
order_item_type varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
order_id bigint(20) unsigned NOT NULL,
PRIMARY KEY (order_item_id),
KEY order_id (order_id)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_payment_tokenmeta (
meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
payment_token_id bigint(20) unsigned NOT NULL,
meta_key varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
meta_value longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (meta_id),
KEY payment_token_id (payment_token_id),
KEY meta_key (meta_key(32))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_payment_tokens (
token_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
gateway_id varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
token text COLLATE utf8mb4_unicode_ci NOT NULL,
user_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
type varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
is_default tinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (token_id),
KEY user_id (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_sessions (
session_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
session_key char(32) COLLATE utf8mb4_unicode_ci NOT NULL,
session_value longtext COLLATE utf8mb4_unicode_ci NOT NULL,
session_expiry bigint(20) unsigned NOT NULL,
PRIMARY KEY (session_id),
UNIQUE KEY session_key (session_key)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_shipping_zones (
zone_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
zone_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
zone_order bigint(20) unsigned NOT NULL,
PRIMARY KEY (zone_id)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_shipping_zone_locations (
location_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
zone_id bigint(20) unsigned NOT NULL,
location_code varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
location_type varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (location_id),
KEY location_id (location_id),
KEY location_type_code (location_type(10),location_code(20))
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_shipping_zone_methods (
zone_id bigint(20) unsigned NOT NULL,
instance_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
method_id varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
method_order bigint(20) unsigned NOT NULL,
is_enabled tinyint(1) NOT NULL DEFAULT ‘1’,
PRIMARY KEY (instance_id)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_tax_rates (
tax_rate_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
tax_rate_country varchar(2) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_rate_state varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_rate varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_rate_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_rate_priority bigint(20) unsigned NOT NULL,
tax_rate_compound int(1) NOT NULL DEFAULT ‘0’,
tax_rate_shipping int(1) NOT NULL DEFAULT ‘1’,
tax_rate_order bigint(20) unsigned NOT NULL,
tax_rate_class varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
PRIMARY KEY (tax_rate_id),
KEY tax_rate_country (tax_rate_country),
KEY tax_rate_state (tax_rate_state(2)),
KEY tax_rate_class (tax_rate_class(10)),
KEY tax_rate_priority (tax_rate_priority)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS wp_woocommerce_tax_rate_locations (
location_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
location_code varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
tax_rate_id bigint(20) unsigned NOT NULL,
location_type varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (location_id),
KEY tax_rate_id (tax_rate_id),
KEY location_type_code (location_type(10),location_code(20))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;