Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save conschneider/c7b5ca8cf76a94b2df88f2c30756046b to your computer and use it in GitHub Desktop.
Save conschneider/c7b5ca8cf76a94b2df88f2c30756046b to your computer and use it in GitHub Desktop.
Please note the wp_ prefix and change accordingly if needed! Also check the table names so you don't drop data of tables already there!
/*
* Please note the wp_ prefix and change accordingly if needed!
* Also check the table names so you don't drop data of tables already there!
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for wp_wc_reserved_stock
-- ----------------------------
DROP TABLE IF EXISTS `wp_wc_reserved_stock`;
CREATE TABLE `wp_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 '0000-01-01 00:00:00',
`expires` datetime NOT NULL DEFAULT '0000-01-01 00:00:00',
PRIMARY KEY (`order_id`,`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
-- ----------------------------
-- Records of wp_wc_reserved_stock
-- ----------------------------
BEGIN;
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
@Katrin62-sys
Copy link

I can't do anything! The error remained. I'm doing something wrong. Please write more details.

@marifrahman
Copy link

I have got the table generated - however still seeing the message :
WooCommerce wp_wc_reserved_stock table creation failed. Does the wp user have CREATE privileges on the wordpress_somedb database?

@conschneider
Copy link
Author

I have got the table generated - however still seeing the message : WooCommerce wp_wc_reserved_stock table creation failed. Does the wp user have CREATE privileges on the wordpress_somedb database?

To my knowledge this happens because these values do not match your environment ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment