-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_stmsrv_create.sql
27 lines (24 loc) · 920 Bytes
/
db_stmsrv_create.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
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
login_name VARCHAR(255) UNIQUE NOT NULL,
pwd TEXT NOT NULL
);
CREATE TABLE video_info (
id VARCHAR(255) PRIMARY KEY NOT NULL,
author_id INT,
name TEXT,
display_ctime TEXT,
create_time DATETIME
);
CREATE TABLE comments (
id VARCHAR(64) PRIMARY KEY NOT NULL,
video_id VARCHAR(64),
author_id INT,
content TEXT,
time DATETIME
);
CREATE TABLE sessions (
session_id VARCHAR(255) PRIMARY KEY NOT NULL,
TTL TINYTEXT,
login_name VARCHAR(255)
);