-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
52 lines (47 loc) · 988 Bytes
/
schema.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
-- FOR USER --
create table if not exists issues (
[title] text not null,
[body] text,
[milestone] text,
[labels] text, -- actually list of str --
[assignees] text, -- actually list of str --
-- Unix epoch when issue happened --
[unix_epoch] integer default (strftime('%s','now')),
-- DO NOT set private rows when inserting!!! --
-- 0: Not Submitted --
-- -1: Submitting --
-- 1: Submitted --
[_sub] integer not null default 0
);
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-- FOR DEVELOPER --
create table if not exists jwt_auth (
[exp_time] integer not null,
[token] text not null
);
create table if not exists acc_auth (
[exp_time] integer not null,
[token] text not null
);
create trigger if not exists issues_insert_validation
before insert on issues
when new._sub!=0
begin
select raise(abort, 'DO NOT set private rows when inserting! See readme or schema for details.');
end;