summaryrefslogtreecommitdiffabout
path: root/test/RP-db.sql
Unidiff
Diffstat (limited to 'test/RP-db.sql') (more/less context) (ignore whitespace changes)
-rw-r--r--test/RP-db.sql37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/RP-db.sql b/test/RP-db.sql
new file mode 100644
index 0000000..71a82d4
--- a/dev/null
+++ b/test/RP-db.sql
@@ -0,0 +1,37 @@
1CREATE TABLE assoc (
2 a_op text,
3 a_handle text NOT NULL,
4 a_type text DEFAULT 'HMAC-SHA1',
5 a_ctime text NOT NULL,
6 a_etime text NOT NULL,
7 a_secret text NOT NULL,
8 a_stateless integer NOT NULL DEFAULT 0,
9 a_itime integer,
10 UNIQUE(a_op,a_handle)
11);
12
13CREATE TABLE nonces (
14 n_op text NOT NULL,
15 n_once text NOT NULL,
16 PRIMARY KEY (n_op,n_once)
17);
18
19CREATE TABLE ht_sessions (
20 hts_id text NOT NULL PRIMARY KEY
21);
22
23CREATE TABLE auth_sessions (
24 as_id integer PRIMARY KEY AUTOINCREMENT,
25 hts_id text NOT NULL REFERENCES ht_sessions(hts_id),
26 as_normalized_id text,
27 UNIQUE (hts_id,as_id)
28);
29
30CREATE TABLE endpoints_queue (
31 as_id integer NOT NULL REFERENCES auth_sessions (as_id),
32 eq_ctime integer NOT NULL,
33 eq_ordinal integer NOT NULL,
34 eq_uri text,
35 eq_claimed_id text,
36 eq_local_id text
37);