1+ drop database if exists ` app_store` ;
2+
3+ create database `app_store ` default character set utf8mb4;
4+
5+ use ` app_store` ;
6+
17create table `app_info ` (
28` id` bigint (20 ) not null auto_increment comment ' 自增id, app的id' ,
39` app_name` varchar (255 ) default ' ' comment ' 名称' ,
@@ -14,10 +20,8 @@ create table `app_info` (
1420` version_desc` varchar (4096 ) default ' ' comment ' ' ,
1521` create_time` datetime not null default ' 0000-00-00 00:00:00' comment ' 创建时间' ,
1622` update_time` datetime not null default ' 0000-00-00 00:00:00' comment ' 更新时间' ,
17- primary key (` id` ),
18- key ` idx_app_name` (` app_name` ),
19- key ` idx_developer` (` user_id` )
20- ) engine= innodb auto_increment= 100000 default charset= utf8 comment= ' app基本信息表' ;
23+ primary key (` id` )
24+ ) engine= innodb auto_increment= 100000 default charset= utf8mb4 comment= ' app基本信息表' ;
2125
2226create table `app_ext_info ` (
2327` id` bigint (20 ) not null auto_increment comment ' 自增id' ,
@@ -27,9 +31,8 @@ create table `app_ext_info` (
2731` comment_count` int (10 ) unsigned not null default ' 0' comment ' 评论量' ,
2832` create_time` int (10 ) not null default 0 comment ' 创建时间' ,
2933` update_time` int (10 ) not null default 0 comment ' 更新时间' ,
30- primary key (` id` ),
31- unique key ` idx_app_id` (` app_id` )
32- ) engine= innodb default charset= utf8 comment= ' App扩展信息表' ;
34+ primary key (` id` )
35+ ) engine= innodb default charset= utf8mb4 comment= ' App扩展信息表' ;
3336
3437create table `app_category ` (
3538` id` bigint (20 ) not null auto_increment comment ' 自增id' ,
@@ -43,16 +46,15 @@ create table `app_category` (
4346` create_time` int (10 ) not null default 0 comment ' 创建时间' ,
4447` update_time` int (10 ) not null default 0 comment ' 更新时间' ,
4548primary key (` id` )
46- ) engine= innodb default charset= utf8 comment= ' 分类信息表' ;
49+ ) engine= innodb default charset= utf8mb4 comment= ' 分类信息表' ;
4750
4851create table `app_category_rel ` (
4952` id` bigint (20 ) not null auto_increment comment ' 自增id' ,
5053` app_id` bigint (20 ) not null default ' 0' comment ' app_id' ,
5154` category_id` bigint (20 ) unsigned not null default ' 0' comment ' 最低层分类id' ,
5255primary key (` id` ),
5356unique key ` idx_category_app` (` category_id` ,` app_record_id` ),
54- key ` idx_app` (` app_id` )
55- ) engine= innodb default charset= utf8 comment= ' App和分类关联表' ;
57+ ) engine= innodb default charset= utf8mb4 comment= ' App和分类关联表' ;
5658
5759create table `app_comment ` (
5860` id` bigint (20 ) not null auto_increment comment ' 自增id' ,
@@ -70,7 +72,7 @@ create table `app_comment` (
7072` update_time` int (10 ) not null default 0 comment ' 更新时间' ,
7173primary key (` id` ),
7274key ` idx_app_status` (` app_id` , ` status` , ` top_flag` )
73- ) engine= innodb default charset= utf8 comment= ' 评论信息表' ;
75+ ) engine= innodb default charset= utf8mb4 comment= ' 评论信息表' ;
7476
7577create table `user_app_relation ` (
7678` id` bigint (20 ) not null auto_increment comment ' 自增id' ,
@@ -81,7 +83,7 @@ create table `user_app_relation` (
8183` is_del` tinyint (4 ) not null default ' 0' comment ' 1:删除 0:未删除' ,
8284primary key (` id` ),
8385key ` idx_user_app` (` user_id` ,` app_id` )
84- ) engine= innodb auto_increment= 8063 default charset= utf8 comment= ' 用户购买关系表' ;
86+ ) engine= innodb auto_increment= 8063 default charset= utf8mb4 comment= ' 用户购买关系表' ;
8587
8688create table `bot_score ` (
8789` id` bigint (20 ) not null auto_increment comment ' 自增id' ,
@@ -93,4 +95,4 @@ create table `bot_score` (
9395` update_time` int (10 ) not null default 0 comment ' 更新时间' ,
9496primary key (` id` ),
9597unique key ` idx_uid_score` (` app_id` ,` commenter_uid` )
96- ) engine= innodb default charset= utf8 comment= ' App评分表' ;
98+ ) engine= innodb default charset= utf8mb4 comment= ' App评分表' ;
0 commit comments