diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index 782b28b7854..d44e1b4491f 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -946,6 +946,14 @@ CREATE TABLE {$wpdb->prefix}wc_tax_rate_classes ( slug varchar(200) NOT NULL DEFAULT '', PRIMARY KEY (tax_rate_class_id), UNIQUE KEY slug (slug($max_index_length)) +) $collate; +CREATE TABLE {$wpdb->prefix}wc_reserved_stock ( + `order_id` bigint(20) NOT NULL, + `product_id` bigint(20) NOT NULL, + `stock_quantity` double NOT NULL DEFAULT 0, + `timestamp` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `expires` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`order_id`, `product_id`) ) $collate; "; @@ -980,6 +988,7 @@ CREATE TABLE {$wpdb->prefix}wc_tax_rate_classes ( "{$wpdb->prefix}woocommerce_shipping_zones", "{$wpdb->prefix}woocommerce_tax_rate_locations", "{$wpdb->prefix}woocommerce_tax_rates", + "{$wpdb->prefix}wc_reserved_stock", ); /** diff --git a/includes/class-woocommerce.php b/includes/class-woocommerce.php index 6fdb8ce21bd..91b4931738c 100644 --- a/includes/class-woocommerce.php +++ b/includes/class-woocommerce.php @@ -246,6 +246,7 @@ final class WooCommerce { 'order_itemmeta' => 'woocommerce_order_itemmeta', 'wc_product_meta_lookup' => 'wc_product_meta_lookup', 'wc_tax_rate_classes' => 'wc_tax_rate_classes', + 'wc_reserved_stock' => 'wc_reserved_stock', ); foreach ( $tables as $name => $table ) {