-
Notifications
You must be signed in to change notification settings - Fork 0
/
.sql
29 lines (22 loc) · 823 Bytes
/
.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
--20211119
CREATE TABLE users (
userid INTEGER PRIMARY KEY NOT NULL,
nickname TEXT NOT NULL,
passwd TEXT NOT NULL
);
CREATE TABLE works (
workid INTEGER PRIMARY KEY AUTOINCREMENT,
workname TEXT DEFAULT "No Name",
authorid INTEGER NOT NULL,
rank INTEGER DEFAULT 0,
ext TEXT
);
CREATE INDEX userid_index ON users (userid);
CREATE INDEX workid_index ON works (workid);
INSERT INTO users (userid, nickname, passwd) VALUES (0, "hehepig", "hehe");
--20211201
CREATE TABLE follows (
whofollow INTEGER NOT NULL,
followwho INTEGER NOT NULL
);
CREATE INDEX follows_index ON follows (whofollow);