Skip to content

Commit

Permalink
Update DB
Browse files Browse the repository at this point in the history
  • Loading branch information
kee236 authored Aug 21, 2024
1 parent 3c39079 commit 1e49547
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions DB/visual_flow_builder.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
CREATE TABLE IF NOT EXISTS `visual_flow_builder_campaign` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`page_id` int(11) NOT NULL,
`unique_id` varchar(50) NOT NULL,
`reference_name` text NOT NULL,
`media_type` enum('fb','ig') NOT NULL DEFAULT 'fb',
`json_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`is_system` enum('0','1') NOT NULL DEFAULT '0' COMMENT 'system defined template or not',
`action_type` enum('reply','UNSUBSCRIBE_QUICK_BOXER','RESUBSCRIBE_QUICK_BOXER','YES_START_CHAT_WITH_BOT','YES_START_CHAT_WITH_HUMAN','QUICK_REPLY_BIRTHDAY_REPLY_BOT','QUICK_REPLY_LOCATION_REPLY_BOT','QUICK_REPLY_PHONE_REPLY_BOT','QUICK_REPLY_EMAIL_REPLY_BOT','get-started','no match','STORY_MENTION','STORY_PRIVATE_REPLY','MESSAGE_UNSEND_PRIVATE_REPLY') NOT NULL DEFAULT 'reply',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `messenger_bot_subscribers_label` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`contact_group_id` int(11) NOT NULL,
`subscriber_table_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `contact_group_id_2` (`contact_group_id`,`subscriber_table_id`),
KEY `contact_group_id` (`contact_group_id`),
KEY `subscriber_table_id` (`subscriber_table_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `messenger_bot_message_sent_stat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`subscriber_id` varchar(30) NOT NULL,
`page_table_id` int(11) NOT NULL,
`message_unique_id` varchar(100) NOT NULL,
`message_type` enum('message','postback') NOT NULL DEFAULT 'message',
`no_sent_click` int(12) NOT NULL,
`error_count` int(12) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `subscriber_id` (`subscriber_id`,`message_unique_id`,`page_table_id`),
KEY `message_unique_id` (`message_unique_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `visual_flow_campaign_unique_ids` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`page_table_id` int(11) NOT NULL,
`visual_flow_campaign_id` int(11) NOT NULL,
`element_unique_id` varchar(60) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `page_table_id` (`page_table_id`,`visual_flow_campaign_id`,`element_unique_id`),
KEY `visual_flow_campaign_id` (`visual_flow_campaign_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 comments on commit 1e49547

Please sign in to comment.