25 lines
1.2 KiB
SQL
25 lines
1.2 KiB
SQL
ALTER TABLE `tao_push_jscode` ADD `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1push2taglink' AFTER `jscode`;
|
|
|
|
DROP TABLE IF EXISTS `tao_tag`;
|
|
CREATE TABLE `tao_tag` (
|
|
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'tag自增id',
|
|
`name` varchar(20) NOT NULL COMMENT '名称',
|
|
`ename` varchar(20) NOT NULL COMMENT '英文名',
|
|
`create_time` int NOT NULL COMMENT '创建时间',
|
|
`update_time` int NOT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`),
|
|
KEY `ename` (`ename`) USING BTREE COMMENT 'ename查询tag索引'
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='文章tag表';
|
|
|
|
DROP TABLE IF EXISTS `tao_taglist`;
|
|
CREATE TABLE `tao_taglist` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '标签列表id',
|
|
`tag_id` int NOT NULL COMMENT '标签id',
|
|
`article_id` int NOT NULL COMMENT '文章id',
|
|
`create_time` int NOT NULL COMMENT '创建时间',
|
|
PRIMARY KEY (`id`),
|
|
KEY `tag_id` (`tag_id`) USING BTREE COMMENT 'tagID索引',
|
|
KEY `article_id` (`article_id`) USING BTREE COMMENT '文章ID查询索引'
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='tag详细列表';
|
|
|
|
ALTER TABLE `tao_article` CHANGE `tags` `keywords` varchar(255) DEFAULT NULL COMMENT '关键词'; |