forked from iwestlin/gd-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-table.sql
59 lines (49 loc) · 1.03 KB
/
create-table.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
CREATE TABLE "gd" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
"fid" TEXT NOT NULL UNIQUE,
"info" TEXT,
"summary" TEXT,
"subf" TEXT,
"ctime" INTEGER,
"mtime" INTEGER
);
CREATE UNIQUE INDEX "gd_fid" ON "gd" (
"fid"
);
CREATE TABLE "task" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
"source" TEXT NOT NULL,
"target" TEXT NOT NULL,
"status" TEXT,
"copied" TEXT DEFAULT '',
"mapping" TEXT DEFAULT '',
"ctime" INTEGER,
"ftime" INTEGER
);
CREATE UNIQUE INDEX "task_source_target" ON "task" (
"source",
"target"
);
CREATE TABLE "copied" (
"taskid" INTEGER,
"fileid" TEXT
);
CREATE INDEX "copied_taskid" ON "copied" ("taskid");
CREATE TABLE "bookmark" (
"alias" TEXT,
"target" TEXT
);
CREATE UNIQUE INDEX "bookmark_alias" ON "bookmark" (
"alias"
);
CREATE TABLE "hash" (
"md5" TEXT NOT NULL,
"gid" TEXT NOT NULL UNIQUE,
"status" TEXT NOT NULL DEFAULT 'normal'
);
CREATE INDEX "hash_md5" ON "hash" (
"md5"
);
CREATE UNIQUE INDEX "hash_gid" ON "hash" (
"gid"
);