-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinit.sql
34 lines (27 loc) · 876 Bytes
/
init.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
drop database if exists thunlp;
create database thunlp;
use thunlp;
grant select, insert, update, delete on thunlp.* to 'root'@'localhost' identified by 'thunlp';
create table user(
id VARCHAR(50) not null,
email VARCHAR(50) not null,
password VARCHAR(50) not null,
token VARCHAR(50) not null,
create_at REAL not null,
last_login REAL not null,
token_time REAL not null,
admin BOOLEAN not null,
PRIMARY KEY (id),
UNIQUE INDEX (email)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table tokeninfo(
user VARCHAR(50) not null,
lac_limit_times Integer not null,
lac_last_time REAL not null,
lac_frequen REAL not null,
PRIMARY KEY (user)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table lac(
user VARCHAR(50) not null,
PRIMARY KEY (user)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;