Closed benfavre closed 6 years ago
"virtual" is a reserved word.
VIRTUAL (R) added in 5.7.6 (reserved)
$tables = "
CREATE TABLE {$wpdb->prefix}wc_products (
`product_id` bigint(20) NOT NULL,
`sku` varchar(100) NULL default '',
`image_id` bigint(20) NULL default 0,
`height` double NULL default NULL,
`width` double NULL default NULL,
`length` double NULL default NULL,
`weight` double NULL default NULL,
`stock_quantity` double NULL default NULL,
`type` varchar(100) NULL default 'simple',
`virtual` tinyint(1) NULL default 0,
`downloadable` tinyint(1) NULL default 0,
`tax_class` varchar(100) NULL default '',
`tax_status` varchar(100) NULL default 'taxable',
`total_sales` double NULL default 0,
`price` double NULL default NULL,
`regular_price` double NULL default NULL,
`sale_price` double NULL default NULL,
`date_on_sale_from` datetime NULL default NULL,
`date_on_sale_to` datetime NULL default NULL,
`average_rating` float NULL default 0,
`stock_status` varchar(100) NULL default 'instock',
PRIMARY KEY (`product_id`),
KEY image_id (image_id),
KEY type (type),
KEY is_virtual (is_virtual),
KEY downloadable (downloadable),
KEY stock_status (stock_status)
) $collate;