更新数据存储格式的设计, 用ext 存储子任务的数据内容.
This commit is contained in:
@@ -2,13 +2,16 @@ create database if not exists `intimate_extractor`;
|
||||
use intimate_extractor;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `anchor_info` (
|
||||
`platform` varchar(255) NOT NULL,
|
||||
`anchor_name` varchar(255) NOT NULL,
|
||||
`platform_url` text NOT NULL,
|
||||
`channel` varchar(128) DEFAULT NULL,
|
||||
`show_type` varchar(255) DEFAULT NULL,
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`platform`, `anchor_name`),
|
||||
`uid` varchar(36) NOT NULL,
|
||||
`platform` varchar(255) NOT NULL,
|
||||
`anchor_name` varchar(255) NOT NULL,
|
||||
`platform_url` text NOT NULL,
|
||||
`channel` varchar(128) DEFAULT NULL,
|
||||
`show_type` varchar(255) DEFAULT NULL,
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `platform_idx` (`platform`),
|
||||
KEY `anchor_name_idx` (`anchor_name`),
|
||||
KEY `channel_idx` (`channel`),
|
||||
KEY `show_type_idx` (`show_type`),
|
||||
KEY `update_time_idx` (`update_time`)
|
||||
@@ -16,10 +19,13 @@ 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,
|
||||
|
||||
`is_showing` tinyint(1) DEFAULT NULL,
|
||||
`is_error` tinyint(1) DEFAULT NULL,
|
||||
|
||||
`followers` int(11) DEFAULT NULL,
|
||||
`views` int(11) DEFAULT NULL,
|
||||
`giver` json DEFAULT NULL,
|
||||
@@ -30,10 +36,14 @@ CREATE TABLE IF NOT EXISTS `show_log` (
|
||||
`show_end_time` timestamp NULL DEFAULT NULL,
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`ext` json DEFAULT NULL,
|
||||
|
||||
`error` text DEFAULT NULL,
|
||||
|
||||
KEY `uid_idx` (`uid`),
|
||||
KEY `platform_idx` (`platform`),
|
||||
KEY `anchor_name_idx` (`anchor_name`),
|
||||
KEY `is_showing_idx` (`is_showing`),
|
||||
KEY `is_error_idx` (`is_error`),
|
||||
KEY `followers_idx` (`followers`),
|
||||
KEY `views_idx` (`views`),
|
||||
KEY `gratuity_idx` (`gratuity`),
|
||||
|
||||
@@ -2,12 +2,16 @@ create database if not exists `intimate_source`;
|
||||
use intimate_source;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `platform_openrec` (
|
||||
uid bigint AUTO_INCREMENT,
|
||||
`url` text NOT NULL,
|
||||
`target_type` varchar(64) NOT NULL,
|
||||
`source` longtext DEFAULT NULL,
|
||||
`ext` json DEFAULT NULL,
|
||||
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`operator` int DEFAULT 0,
|
||||
`error_msg` text DEFAULT NULL,
|
||||
PRIMARY KEY(`uid`),
|
||||
KEY `operator_idx` (`operator`),
|
||||
KEY `update_time_idx` (`update_time`),
|
||||
KEY `target_type_idx` (`target_type`)
|
||||
|
||||
Reference in New Issue
Block a user