-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspiapp-sqlite.sql
92 lines (81 loc) · 1.91 KB
/
spiapp-sqlite.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
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
85
86
87
88
89
90
91
92
--
-- Name: members
--
CREATE TABLE members (
memid INTEGER PRIMARY KEY AUTOINCREMENT,
name character varying(50),
email character varying(50),
phone character varying(20),
password character varying(15),
pgpkey character varying(50),
firstdate date,
expirydate date,
ismember boolean DEFAULT 0 NOT NULL,
iscontrib boolean DEFAULT 0 NOT NULL,
ismanager boolean DEFAULT 0 NOT NULL,
createvote boolean DEFAULT 0 NOT NULL,
sub_private boolean DEFAULT 0,
lastactive date
);
--
-- Name: applications
--
CREATE TABLE applications (
appid INTEGER PRIMARY KEY AUTOINCREMENT,
appdate date,
member integer,
emailkey character varying(50),
emailkey_date date,
validemail boolean,
validemail_date date,
contrib text,
comment text,
lastchange date,
manager integer,
manager_date date,
approve boolean,
approve_date date,
contribapp boolean DEFAULT 0
);
--
-- Name: vote_election
--
CREATE TABLE vote_election (
ref INTEGER PRIMARY KEY AUTOINCREMENT,
title character varying(256) NOT NULL,
description text,
period_start timestamp with time zone,
period_stop timestamp with time zone,
owner integer NOT NULL,
winners integer DEFAULT 1 NOT NULL,
system integer NOT NULL
);
--
-- Name: vote_option
--
CREATE TABLE vote_option (
ref INTEGER PRIMARY KEY AUTOINCREMENT,
election_ref integer NOT NULL,
description text,
sort integer NOT NULL,
option_character character(1) NOT NULL
);
--
-- Name: vote_vote
--
CREATE TABLE vote_vote (
ref integer NOT NULL,
voter_ref integer,
election_ref integer NOT NULL,
private_secret character(32),
late_updated timestamp with time zone,
sent_notify boolean DEFAULT 0 NOT NULL
);
--
-- Name: vote_voteoption
--
CREATE TABLE vote_voteoption (
vote_ref integer NOT NULL,
option_ref integer NOT NULL,
preference integer
);