intimate/sql/intimate_source.sql
eson e1040e69cd 1.重构命名, 简化代码, 加入build.sh
2.重构数据字段结构, 使数据合理性提高.
3.测试通过openrec获取数据完整性.
TODO: 测试时区问题.
2020-07-17 18:21:38 +08:00

18 lines
580 B
SQL

create database if not exists `intimate_source`;
use intimate_source;
CREATE TABLE IF NOT EXISTS `source_openrec` (
uid bigint AUTO_INCREMENT,
`url` text NOT NULL,
`target_type` varchar(64) NOT NULL,
`source` longtext DEFAULT NULL,
`ext` json DEFAULT NULL,
`pass_gob` blob 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`)
);