This repository has been archived by the owner on May 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
/
cache.sql
89 lines (72 loc) · 2.77 KB
/
cache.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
-- phpMyAdmin SQL Dump
-- version 5.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
CREATE TABLE `cache` (
`id` int(10) UNSIGNED NOT NULL COMMENT 'id',
`expired_time` int(11) NOT NULL COMMENT '到期时间',
`area` varchar(10) DEFAULT NULL,
`type` tinyint(4) NOT NULL,
`cache_type` varchar(100) NOT NULL,
`cid` varchar(100) NOT NULL,
`ep_id` varchar(100) DEFAULT NULL,
`cache` mediumtext NOT NULL COMMENT '缓存内容'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='缓存';
ALTER TABLE `cache`
ADD PRIMARY KEY (`id`);
ALTER TABLE `cache`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id';
CREATE TABLE `keys` (
`id` int(10) UNSIGNED NOT NULL COMMENT 'id',
`add_time` datetime NOT NULL COMMENT '添加时间',
`uid` bigint(20) DEFAULT NULL COMMENT '用户ID',
`access_key` varchar(100) DEFAULT NULL,
`due_date` bigint(50) DEFAULT NULL,
`expired` tinyint(1) NOT NULL DEFAULT 0 COMMENT '过期key'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='访客表';
ALTER TABLE `keys`
ADD PRIMARY KEY (`id`);
ALTER TABLE `keys`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id';
CREATE TABLE `my_keys` (
`id` int(10) UNSIGNED NOT NULL COMMENT 'id',
`expired_time` int(11) NOT NULL COMMENT '到期时间',
`type` tinyint(4) NOT NULL COMMENT '类型',
`uid` bigint(20) DEFAULT NULL COMMENT '用户ID',
`access_token` varchar(100) NOT NULL,
`refresh_token` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='我的key';
ALTER TABLE `my_keys`
ADD PRIMARY KEY (`id`);
ALTER TABLE `my_keys`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id';
CREATE TABLE `status` (
`id` int(10) NOT NULL COMMENT 'id',
`expired_time` int(11) NOT NULL COMMENT '到期时间',
`uid` bigint(20) NOT NULL COMMENT '用户id',
`is_blacklist` tinyint(1) NOT NULL,
`is_whitelist` tinyint(1) NOT NULL,
`reason` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='黑白名单';
ALTER TABLE `status`
ADD PRIMARY KEY (`id`);
ALTER TABLE `status`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id';
CREATE TABLE `log` (
`id` int(10) UNSIGNED NOT NULL COMMENT 'id',
`time` datetime NOT NULL COMMENT '添加时间',
`ip` tinytext,
`area` tinytext COMMENT '地区',
`version` tinytext COMMENT '漫游版本号',
`version_code` smallint(6) DEFAULT '0' COMMENT '漫游版本编号',
`access_key` tinytext,
`uid` bigint(20) DEFAULT '0',
`ban_code` tinyint(4) DEFAULT '0' COMMENT '封禁代号',
`path` text COMMENT '请求路径',
`query` mediumtext COMMENT '请求参数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志';
ALTER TABLE `log`
ADD PRIMARY KEY (`id`);
ALTER TABLE `log`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id';
COMMIT;