Add table schema
This commit is contained in:
parent
c983677a6f
commit
62e099bd84
|
@ -946,6 +946,14 @@ CREATE TABLE {$wpdb->prefix}wc_tax_rate_classes (
|
||||||
slug varchar(200) NOT NULL DEFAULT '',
|
slug varchar(200) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY (tax_rate_class_id),
|
PRIMARY KEY (tax_rate_class_id),
|
||||||
UNIQUE KEY slug (slug($max_index_length))
|
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;
|
) $collate;
|
||||||
";
|
";
|
||||||
|
|
||||||
|
@ -980,6 +988,7 @@ CREATE TABLE {$wpdb->prefix}wc_tax_rate_classes (
|
||||||
"{$wpdb->prefix}woocommerce_shipping_zones",
|
"{$wpdb->prefix}woocommerce_shipping_zones",
|
||||||
"{$wpdb->prefix}woocommerce_tax_rate_locations",
|
"{$wpdb->prefix}woocommerce_tax_rate_locations",
|
||||||
"{$wpdb->prefix}woocommerce_tax_rates",
|
"{$wpdb->prefix}woocommerce_tax_rates",
|
||||||
|
"{$wpdb->prefix}wc_reserved_stock",
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -246,6 +246,7 @@ final class WooCommerce {
|
||||||
'order_itemmeta' => 'woocommerce_order_itemmeta',
|
'order_itemmeta' => 'woocommerce_order_itemmeta',
|
||||||
'wc_product_meta_lookup' => 'wc_product_meta_lookup',
|
'wc_product_meta_lookup' => 'wc_product_meta_lookup',
|
||||||
'wc_tax_rate_classes' => 'wc_tax_rate_classes',
|
'wc_tax_rate_classes' => 'wc_tax_rate_classes',
|
||||||
|
'wc_reserved_stock' => 'wc_reserved_stock',
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ( $tables as $name => $table ) {
|
foreach ( $tables as $name => $table ) {
|
||||||
|
|
Loading…
Reference in New Issue