Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conschneider/e528bda6393e49a8fa0559febd84046d to your computer and use it in GitHub Desktop.
Save conschneider/e528bda6393e49a8fa0559febd84046d to your computer and use it in GitHub Desktop.
This SQL command creates the WooCommerce Admin tables for WooCommerce 4 manually.
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for wp_wc_admin_note_actions
-- INFO: This uses the prefix wp_ - change accordingly.
-- ----------------------------
DROP TABLE IF EXISTS `wp_wc_admin_note_actions`;
CREATE TABLE `wp_wc_admin_note_actions` (
`action_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`note_id` bigint(20) unsigned NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`label` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`query` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
`status` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`is_primary` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`action_id`),
KEY `note_id` (`note_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
-- ----------------------------
-- Table structure for wp_wc_admin_notes
-- INFO: This uses the prefix wp_ - change accordingly.
-- ----------------------------
DROP TABLE IF EXISTS `wp_wc_admin_notes`;
CREATE TABLE `wp_wc_admin_notes` (
`note_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`type` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`locale` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`title` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
`content` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
`icon` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`content_data` longtext COLLATE utf8mb4_unicode_520_ci,
`status` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`source` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`date_created` datetime NOT NULL DEFAULT '0000-01-01 00:00:00',
`date_reminder` datetime DEFAULT NULL,
`is_snoozable` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`note_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
SET FOREIGN_KEY_CHECKS = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment