elegraf
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] WordPress database error Table during upgrade to 4.0HI @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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
namevarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
typevarchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
localevarchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
titlelongtext COLLATE utf8mb4_unicode_ci NOT NULL,
contentlongtext COLLATE utf8mb4_unicode_ci NOT NULL,
iconvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
content_datalongtext COLLATE utf8mb4_unicode_ci,
statusvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
sourcevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
date_createddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_reminderdatetime DEFAULT NULL,
is_snoozabletinyint(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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
note_idbigint(20) unsigned NOT NULL,
namevarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
labelvarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
querylongtext COLLATE utf8mb4_unicode_ci NOT NULL,
statusvarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
is_primarytinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (action_id),
KEYnote_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_idbigint(20) unsigned NOT NULL,
category_idbigint(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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
user_idbigint(20) unsigned DEFAULT NULL,
usernamevarchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
first_namevarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
last_namevarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
emailvarchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
date_last_activetimestamp NULL DEFAULT NULL,
date_registeredtimestamp NULL DEFAULT NULL,
countrychar(2) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
postcodevarchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
cityvarchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
statevarchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
PRIMARY KEY (customer_id),
UNIQUE KEYuser_id(user_id),
KEYemail(email)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_wc_download_log(
download_log_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
timestampdatetime NOT NULL,
permission_idbigint(20) unsigned NOT NULL,
user_idbigint(20) unsigned DEFAULT NULL,
user_ip_addressvarchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
PRIMARY KEY (download_log_id),
KEYpermission_id(permission_id),
KEYtimestamp(timestamp),
CONSTRAINTfk_wp_wc_download_log_permission_idFOREIGN KEY (permission_id) REFERENCESwp_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_idbigint(20) unsigned NOT NULL,
coupon_idbigint(20) unsigned NOT NULL,
date_createddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
discount_amountdouble NOT NULL DEFAULT ‘0’,
PRIMARY KEY (order_id,coupon_id),
KEYcoupon_id(coupon_id),
KEYdate_created(date_created)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_wc_order_product_lookup(
order_item_idbigint(20) unsigned NOT NULL,
order_idbigint(20) unsigned NOT NULL,
product_idbigint(20) unsigned NOT NULL,
variation_idbigint(20) unsigned NOT NULL,
customer_idbigint(20) unsigned DEFAULT NULL,
date_createddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
product_qtyint(11) NOT NULL,
product_net_revenuedouble NOT NULL DEFAULT ‘0’,
product_gross_revenuedouble NOT NULL DEFAULT ‘0’,
coupon_amountdouble NOT NULL DEFAULT ‘0’,
tax_amountdouble NOT NULL DEFAULT ‘0’,
shipping_amountdouble NOT NULL DEFAULT ‘0’,
shipping_tax_amountdouble NOT NULL DEFAULT ‘0’,
PRIMARY KEY (order_item_id),
KEYorder_id(order_id),
KEYproduct_id(product_id),
KEYcustomer_id(customer_id),
KEYdate_created(date_created)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_wc_order_stats(
order_idbigint(20) unsigned NOT NULL,
parent_idbigint(20) unsigned NOT NULL DEFAULT ‘0’,
date_createddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_created_gmtdatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
num_items_soldint(11) NOT NULL DEFAULT ‘0’,
total_salesdouble NOT NULL DEFAULT ‘0’,
tax_totaldouble NOT NULL DEFAULT ‘0’,
shipping_totaldouble NOT NULL DEFAULT ‘0’,
net_totaldouble NOT NULL DEFAULT ‘0’,
returning_customertinyint(1) DEFAULT NULL,
statusvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
customer_idbigint(20) unsigned NOT NULL,
PRIMARY KEY (order_id),
KEYdate_created(date_created),
KEYcustomer_id(customer_id),
KEYstatus(status(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_wc_order_tax_lookup(
order_idbigint(20) unsigned NOT NULL,
tax_rate_idbigint(20) unsigned NOT NULL,
date_createddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
shipping_taxdouble NOT NULL DEFAULT ‘0’,
order_taxdouble NOT NULL DEFAULT ‘0’,
total_taxdouble NOT NULL DEFAULT ‘0’,
PRIMARY KEY (order_id,tax_rate_id),
KEYtax_rate_id(tax_rate_id),
KEYdate_created(date_created)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_wc_product_meta_lookup(
product_idbigint(20) NOT NULL,
skuvarchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
virtualtinyint(1) DEFAULT ‘0’,
downloadabletinyint(1) DEFAULT ‘0’,
min_pricedecimal(19,4) DEFAULT NULL,
max_pricedecimal(19,4) DEFAULT NULL,
onsaletinyint(1) DEFAULT ‘0’,
stock_quantitydouble DEFAULT NULL,
stock_statusvarchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ‘instock’,
rating_countbigint(20) DEFAULT ‘0’,
average_ratingdecimal(3,2) DEFAULT ‘0.00’,
total_salesbigint(20) DEFAULT ‘0’,
tax_statusvarchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ‘taxable’,
tax_classvarchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
PRIMARY KEY (product_id),
KEYvirtual(virtual),
KEYdownloadable(downloadable),
KEYstock_status(stock_status),
KEYstock_quantity(stock_quantity),
KEYonsale(onsale),
KEYmin_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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
namevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
slugvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
PRIMARY KEY (tax_rate_class_id),
UNIQUE KEYslug(slug(191))
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_wc_webhooks(
webhook_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
statusvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
nametext COLLATE utf8mb4_unicode_ci NOT NULL,
user_idbigint(20) unsigned NOT NULL,
delivery_urltext COLLATE utf8mb4_unicode_ci NOT NULL,
secrettext COLLATE utf8mb4_unicode_ci NOT NULL,
topicvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
date_createddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_created_gmtdatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_modifieddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
date_modified_gmtdatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
api_versionsmallint(4) NOT NULL,
failure_countsmallint(10) NOT NULL DEFAULT ‘0’,
pending_deliverytinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (webhook_id),
KEYuser_id(user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_woocommerce_api_keys(
key_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
user_idbigint(20) unsigned NOT NULL,
descriptionvarchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
permissionsvarchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
consumer_keychar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
consumer_secretchar(43) COLLATE utf8mb4_unicode_ci NOT NULL,
nonceslongtext COLLATE utf8mb4_unicode_ci,
truncated_keychar(7) COLLATE utf8mb4_unicode_ci NOT NULL,
last_accessdatetime DEFAULT NULL,
PRIMARY KEY (key_id),
KEYconsumer_key(consumer_key),
KEYconsumer_secret(consumer_secret)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_woocommerce_attribute_taxonomies(
attribute_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
attribute_namevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
attribute_labelvarchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
attribute_typevarchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
attribute_orderbyvarchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
attribute_publicint(1) NOT NULL DEFAULT ‘1’,
PRIMARY KEY (attribute_id),
KEYattribute_name(attribute_name(20))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_woocommerce_downloadable_product_permissions(
permission_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
download_idvarchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
product_idbigint(20) unsigned NOT NULL,
order_idbigint(20) unsigned NOT NULL DEFAULT ‘0’,
order_keyvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
user_emailvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
user_idbigint(20) unsigned DEFAULT NULL,
downloads_remainingvarchar(9) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
access_granteddatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
access_expiresdatetime DEFAULT NULL,
download_countbigint(20) unsigned NOT NULL DEFAULT ‘0’,
PRIMARY KEY (permission_id),
KEYdownload_order_key_product(product_id,order_id,order_key(16),download_id),
KEYdownload_order_product(download_id,order_id,product_id),
KEYorder_id(order_id),
KEYuser_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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
timestampdatetime NOT NULL,
levelsmallint(4) NOT NULL,
sourcevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
messagelongtext COLLATE utf8mb4_unicode_ci NOT NULL,
contextlongtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (log_id),
KEYlevel(level)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_woocommerce_order_itemmeta(
meta_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
order_item_idbigint(20) unsigned NOT NULL,
meta_keyvarchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
meta_valuelongtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (meta_id),
KEYorder_item_id(order_item_id),
KEYmeta_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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
order_item_nametext COLLATE utf8mb4_unicode_ci NOT NULL,
order_item_typevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
order_idbigint(20) unsigned NOT NULL,
PRIMARY KEY (order_item_id),
KEYorder_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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
payment_token_idbigint(20) unsigned NOT NULL,
meta_keyvarchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
meta_valuelongtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (meta_id),
KEYpayment_token_id(payment_token_id),
KEYmeta_key(meta_key(32))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_woocommerce_payment_tokens(
token_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
gateway_idvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
tokentext COLLATE utf8mb4_unicode_ci NOT NULL,
user_idbigint(20) unsigned NOT NULL DEFAULT ‘0’,
typevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
is_defaulttinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (token_id),
KEYuser_id(user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;CREATE TABLE IF NOT EXISTS
wp_woocommerce_sessions(
session_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
session_keychar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
session_valuelongtext COLLATE utf8mb4_unicode_ci NOT NULL,
session_expirybigint(20) unsigned NOT NULL,
PRIMARY KEY (session_id),
UNIQUE KEYsession_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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
zone_namevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
zone_orderbigint(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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
zone_idbigint(20) unsigned NOT NULL,
location_codevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
location_typevarchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (location_id),
KEYlocation_id(location_id),
KEYlocation_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_idbigint(20) unsigned NOT NULL,
instance_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
method_idvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
method_orderbigint(20) unsigned NOT NULL,
is_enabledtinyint(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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
tax_rate_countryvarchar(2) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_rate_statevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_ratevarchar(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_rate_namevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
tax_rate_prioritybigint(20) unsigned NOT NULL,
tax_rate_compoundint(1) NOT NULL DEFAULT ‘0’,
tax_rate_shippingint(1) NOT NULL DEFAULT ‘1’,
tax_rate_orderbigint(20) unsigned NOT NULL,
tax_rate_classvarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
PRIMARY KEY (tax_rate_id),
KEYtax_rate_country(tax_rate_country),
KEYtax_rate_state(tax_rate_state(2)),
KEYtax_rate_class(tax_rate_class(10)),
KEYtax_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_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
location_codevarchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
tax_rate_idbigint(20) unsigned NOT NULL,
location_typevarchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (location_id),
KEYtax_rate_id(tax_rate_id),
KEYlocation_type_code(location_type(10),location_code(20))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;Forum: Plugins
In reply to: [WooCommerce] After updating woocommerce to version 4 FATAL ERRORSame issue after updating to 4.0. Log full of errors for missing some tables
Forum: Plugins
In reply to: [WooCommerce] WordPress database error Table during upgrade to 4.0Same errors in log:
.wp_wc_order_stats’ doesn’t exist
.wp_wc_customer_lookup’ doesn’t exist
.wp_wc_order_stats’ doesn’t exist
.wp_wc_order_product_lookup’ doesn’t exist
.wp_wc_order_coupon_lookup’ doesn’t existtables do not exist in my database. Tryied to uninstall woocommerce, delate tables and reinstall but still missing tables.
I don’t have any of these tables:
wp_wc_admin_notes
wp_wc_admin_note_actions
wp_wc_category_lookup
wp_wc_customer_lookup
wp_wc_order_coupon_lookup
wp_wc_order_product_lookup
wp_wc_order_stats
wp_wc_order_tax_lookup