summaryrefslogtreecommitdiffstats
path: root/adenosine-pds/src/atp_db.sql
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-11-01 19:44:09 -0700
committerBryan Newbold <bnewbold@robocracy.org>2022-11-01 19:44:09 -0700
commitf3fdc7ba600c65fdb05efc2fd5e9a651b4b9956e (patch)
treecf2522e44a56fb621a5e72364951ab7a1c29ef45 /adenosine-pds/src/atp_db.sql
parent96c6dbc6c500a7ca3ebefe4ee4fb91fcb8c1713c (diff)
downloadadenosine-f3fdc7ba600c65fdb05efc2fd5e9a651b4b9956e.tar.gz
adenosine-f3fdc7ba600c65fdb05efc2fd5e9a651b4b9956e.zip
pds: refactor repo code
Diffstat (limited to 'adenosine-pds/src/atp_db.sql')
-rw-r--r--adenosine-pds/src/atp_db.sql11
1 files changed, 5 insertions, 6 deletions
diff --git a/adenosine-pds/src/atp_db.sql b/adenosine-pds/src/atp_db.sql
index 918a89c..a6fce1c 100644
--- a/adenosine-pds/src/atp_db.sql
+++ b/adenosine-pds/src/atp_db.sql
@@ -6,7 +6,7 @@ CREATE TABLE account(
username TEXT NOT NULL,
email TEXT NOT NULL,
password_bcrypt TEXT NOT NULL,
- signing_key TEXT NOT NULL,
+ signing_key TEXT NOT NULL
);
CREATE UNIQUE INDEX account_username_uniq_idx on account(lower(username));
CREATE UNIQUE INDEX account_email_uniq_idx on account(lower(email));
@@ -14,19 +14,19 @@ CREATE UNIQUE INDEX account_email_uniq_idx on account(lower(email));
CREATE TABLE did_doc(
did TEXT PRIMARY KEY NOT NULL,
doc_json TEXT NOT NULL,
- seen_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
+ seen_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT ( DATETIME('now') )
);
CREATE TABLE session(
did TEXT NOT NULL,
jwt TEXT NOT NULL,
- created_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
+ created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT ( DATETIME('now') ),
PRIMARY KEY(did, jwt)
);
CREATE TABLE repo(
did TEXT PRIMARY KEY NOT NULL,
- head_commit TEXT NOT NULL,
+ head_commit TEXT NOT NULL
);
CREATE TABLE record(
@@ -44,7 +44,6 @@ CREATE TABLE password_reset(
PRIMARY KEY(did, token)
);
-
----------- bsky app/index tables
-
+-- TODO