diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-09 15:35:17 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-09 15:35:38 -0800 |
commit | 7af51292ddfc81d55dd5beff07c557757bb0075f (patch) | |
tree | 6601cc2c73adab784f791f650e08fd9dc92aa65b /adenosine-pds/src/atp_db.sql | |
parent | b8eea211866766aabde8c5e55d1061deb799ddc6 (diff) | |
download | adenosine-7af51292ddfc81d55dd5beff07c557757bb0075f.tar.gz adenosine-7af51292ddfc81d55dd5beff07c557757bb0075f.zip |
pds: more bsky posts/feeds/follow/like progress
Diffstat (limited to 'adenosine-pds/src/atp_db.sql')
-rw-r--r-- | adenosine-pds/src/atp_db.sql | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/adenosine-pds/src/atp_db.sql b/adenosine-pds/src/atp_db.sql index 71fbf6d..9a6e30c 100644 --- a/adenosine-pds/src/atp_db.sql +++ b/adenosine-pds/src/atp_db.sql @@ -33,19 +33,22 @@ CREATE TABLE bsky_post( tid TEXT NOT NULL, cid TEXT NOT NULL, record_json TEXT NOT NULL, - reply_root_uri TEXT, + reply_to_parent_uri TEXT, + reply_to_root_uri TEXT, created_at TIMESTAMP WITH TIME ZONE NOT NULL, indexed_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT ( DATETIME('now') ), PRIMARY KEY(did, tid) ); -CREATE INDEX bsky_post_reply_root_uri_idx on bsky_post(reply_root_uri); +CREATE INDEX bsky_post_reply_to_parent_uri_idx on bsky_post(reply_to_parent_uri); +CREATE INDEX bsky_post_reply_to_root_uri_idx on bsky_post(reply_to_root_uri); CREATE TABLE bsky_ref( ref_type TEXT NOT NULL, did TEXT NOT NULL, tid TEXT NOT NULL, subject_uri TEXT NOT NULL, - subject_cid TEXT NOT NULL, + -- TODO: NOT NULL on subject_cid + subject_cid TEXT, created_at TIMESTAMP WITH TIME ZONE NOT NULL, indexed_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT ( DATETIME('now') ), PRIMARY KEY(ref_type, did, tid) @@ -56,7 +59,8 @@ CREATE TABLE bsky_follow( did TEXT NOT NULL, tid TEXT NOT NULL, subject_did TEXT NOT NULL, - subject_cid TEXT NOT NULL, + -- TODO: NOT NULL on subject_cid + subject_cid TEXT, created_at TIMESTAMP WITH TIME ZONE NOT NULL, indexed_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT ( DATETIME('now') ), PRIMARY KEY(did, tid) @@ -68,7 +72,8 @@ CREATE TABLE bsky_notification( pk INTEGER PRIMARY KEY AUTOINCREMENT, user_did TEXT NOT NULL, subject_uri TEXT NOT NULL, - subject_cid TEXT NOT NULL, + -- TODO: NOT NULL on subject_cid + subject_cid TEXT, reason TEXT NOT NULL, seen_at TIMESTAMP WITH TIME ZONE, indexed_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT ( DATETIME('now') ) |