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
|
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
|
+
+
+
+
+
+
+
+
+
+
+
-
+
|
CREATE TABLE IF NOT EXISTS areas (
id SERIAL PRIMARY KEY,
area_name TEXT NOT NULL,
area_path TEXT NOT NULL,
last_sync INTEGER DEFAULT 0,
CONSTRAINT areaconstraint UNIQUE (area_name));
CREATE TABLE IF NOT EXISTS tags (
id SERIAL PRIMARY KEY,
tag_name TEXT NOT NULL,
CONSTRAINT tagconstraint UNIQUE (tag_name));
CREATE TABLE IF NOT EXISTS area_tags (
id SERIAL PRIMARY KEY,
tag_id INTEGER DEFAULT 0,
area_id INTEGER DEFAULT 0,
CONSTRAINT areatagconstraint UNIQUE (tag_id, area_id));
INSERT INTO areas (id,area_name,area_path) VALUES (0,'local','.');
CREATE TABLE IF NOT EXISTS ttype (
id SERIAL PRIMARY KEY,
target_spec TEXT DEFAULT '');
CREATE TABLE IF NOT EXISTS runs (
id SERIAL PRIMARY KEY,
target TEXT DEFAULT '',
ttype_id INTEGER DEFAULT 0,
run_name TEXT DEFAULT 'norun',
state TEXT DEFAULT '',
status TEXT DEFAULT '',
owner TEXT DEFAULT '',
event_time INTEGER DEFAULT extract(epoch from now()),
comment TEXT DEFAULT '',
fail_count INTEGER DEFAULT 0,
pass_count INTEGER DEFAULT 0,
last_update INTEGER DEFAULT extract(epoch from now()),
area_id INTEGER DEFAULT 0,
CONSTRAINT runsconstraint UNIQUE (target,ttype_id,run_name));
CONSTRAINT runsconstraint UNIQUE (target,ttype_id,run_name, area_id));
CREATE TABLE IF NOT EXISTS run_stats (
id SERIAL PRIMARY KEY,
run_id INTEGER,
state TEXT,
status TEXT,
count INTEGER,
|
206
207
208
209
210
211
212
213
214
215
216
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
test_id INTEGER,
state TEXT DEFAULT 'new',
status TEXT DEFAULT 'n/a',
archive_type TEXT DEFAULT 'bup',
du INTEGER,
archive_path TEXT);
CREATE TABLE IF NOT EXISTS users(
id SERIAL PRIMARY KEY ,
usename TEXT NOT NULL,
fullname TEXT NOT NULL,
email TEXT NOT NULL,
deleted INTEGER default 0
);
CREATE TABLE IF NOT EXISTS webviews(
id SERIAL PRIMARY KEY ,
owner_id INTEGER NOT NULL,
name TEXT NOT NULL,
ttype_id INTEGER DEFAULT 0,
view_specifics TEXT ,
col TEXT NOT NULL,
row TEXT NOT NULL,
deleted INTEGER default 0
);
-- TRUNCATE archive_blocks, archive_allocations, extradat, metadat,
-- access_log, tests, test_steps, test_data, test_rundat, archives, runs,
-- run_stats, test_meta, tasks_queue, archive_disks;
|