Created
July 3, 2021 05:29
-
-
Save AashikP/debbfdb39bcab08e988485c5d72a4e81 to your computer and use it in GitHub Desktop.
Create Note and Note Actions table for WooCommerce admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `wp_wc_admin_notes` ( | |
`note_id` bigint(20) UNSIGNED NOT NULL, | |
`name` varchar(255) NOT NULL, | |
`type` varchar(20) NOT NULL, | |
`locale` varchar(20) NOT NULL, | |
`title` longtext NOT NULL, | |
`content` longtext NOT NULL, | |
`icon` varchar(200) NOT NULL DEFAULT 'info', | |
`content_data` longtext DEFAULT NULL, | |
`status` varchar(200) NOT NULL, | |
`source` varchar(200) NOT NULL, | |
`date_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', | |
`date_reminder` datetime DEFAULT NULL, | |
`is_snoozable` tinyint(1) NOT NULL DEFAULT 0, | |
`layout` varchar(20) NOT NULL DEFAULT '', | |
`image` varchar(200) DEFAULT NULL, | |
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
ALTER TABLE `wp_wc_admin_notes` | |
ADD PRIMARY KEY (`note_id`); | |
ALTER TABLE `wp_wc_admin_notes` | |
MODIFY `note_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; | |
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `wp_wc_admin_note_actions` ( | |
`action_id` bigint(20) UNSIGNED NOT NULL, | |
`note_id` bigint(20) UNSIGNED NOT NULL, | |
`name` varchar(255) NOT NULL, | |
`label` varchar(255) NOT NULL, | |
`query` longtext NOT NULL, | |
`status` varchar(255) NOT NULL, | |
`is_primary` tinyint(1) NOT NULL DEFAULT 0, | |
`actioned_text` varchar(255) NOT NULL, | |
`nonce_action` varchar(255) DEFAULT NULL, | |
`nonce_name` varchar(255) DEFAULT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
ALTER TABLE `wp_wc_admin_note_actions` | |
ADD PRIMARY KEY (`action_id`), | |
ADD KEY `note_id` (`note_id`); | |
ALTER TABLE `wp_wc_admin_note_actions` | |
MODIFY `action_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment