From 0b5425088fc31fe8a31fff2e1be176e946bd3ea0 Mon Sep 17 00:00:00 2001 From: eson Date: Wed, 8 Jul 2020 10:11:35 +0800 Subject: [PATCH] add: anchor_id field fix: table some key --- sql/intimate_extractor.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/intimate_extractor.sql b/sql/intimate_extractor.sql index 9364a70..c1d12e9 100644 --- a/sql/intimate_extractor.sql +++ b/sql/intimate_extractor.sql @@ -4,6 +4,7 @@ use intimate_extractor; CREATE TABLE IF NOT EXISTS `anchor_info` ( `uid` varchar(36) NOT NULL, `platform` varchar(255) NOT NULL, + `anchor_id` varchar(255) NOT NULL, `anchor_name` varchar(255) NOT NULL, `platform_url` text NOT NULL, `channel` varchar(128) DEFAULT NULL, @@ -11,6 +12,7 @@ CREATE TABLE IF NOT EXISTS `anchor_info` ( `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`uid`), KEY `platform_idx` (`platform`), + KEY `anchor_id_idx` (`anchor_id`), KEY `anchor_name_idx` (`anchor_name`), KEY `channel_idx` (`channel`), KEY `show_type_idx` (`show_type`), @@ -21,7 +23,7 @@ CREATE TABLE IF NOT EXISTS `anchor_info` ( CREATE TABLE IF NOT EXISTS `show_log` ( `uid` varchar(36) NOT NULL, `platform` varchar(255) NOT NULL, - `anchor_name` varchar(255) NOT NULL, + `anchor_id` varchar(255) NOT NULL, `is_showing` tinyint(1) DEFAULT NULL, `is_error` tinyint(1) DEFAULT NULL, @@ -41,7 +43,7 @@ CREATE TABLE IF NOT EXISTS `show_log` ( KEY `uid_idx` (`uid`), KEY `platform_idx` (`platform`), - KEY `anchor_name_idx` (`anchor_name`), + KEY `anchor_id_idx` (`anchor_id`), KEY `is_showing_idx` (`is_showing`), KEY `is_error_idx` (`is_error`), KEY `followers_idx` (`followers`),