From f3fdc7ba600c65fdb05efc2fd5e9a651b4b9956e Mon Sep 17 00:00:00 2001
From: Bryan Newbold <bnewbold@robocracy.org>
Date: Tue, 1 Nov 2022 19:44:09 -0700
Subject: pds: refactor repo code

---
 adenosine-pds/src/atp_db.sql | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'adenosine-pds/src/atp_db.sql')

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
-- 
cgit v1.2.3

