add timeline feeds
This commit is contained in:
parent
4f19c1c3c0
commit
76a487b5fe
2 changed files with 29 additions and 0 deletions
|
@ -2,6 +2,8 @@ DROP MATERIALIZED VIEW IF EXISTS reaction_by_id;
|
|||
DROP MATERIALIZED VIEW IF EXISTS reaction_by_userid;
|
||||
DROP INDEX IF EXISTS reaction_by_id;
|
||||
DROP TABLE IF EXISTS reaction;
|
||||
DROP TABLE IF EXISTS local_feed;
|
||||
DROP TABLE IF EXISTS home_feed;
|
||||
DROP MATERIALIZED VIEW IF EXISTS note_by_renote_id;
|
||||
DROP MATERIALIZED VIEW IF EXISTS note_by_userid;
|
||||
DROP MATERIALIZED VIEW IF EXISTS note_by_id;
|
||||
|
|
|
@ -101,6 +101,33 @@ CREATE MATERIALIZED VIEW IF NOT EXISTS note_by_renote_id AS
|
|||
PRIMARY KEY ("renoteId", "createdAt", "createdAtDate", "userId")
|
||||
WITH CLUSTERING ORDER BY ("createdAt" DESC);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS home_feed (
|
||||
"userId" ascii,
|
||||
"fedAtDate" date,
|
||||
"fedAt" timestamp,
|
||||
"noteId" ascii,
|
||||
"noteUserId" ascii,
|
||||
"noteUserHost" text,
|
||||
"replyUserId" ascii,
|
||||
"replyUserHost" text,
|
||||
"renoteUserId" ascii,
|
||||
"renoteUserHost" text,
|
||||
PRIMARY KEY (("userId", "fedAtDate"), "fedAt")
|
||||
) WITH CLUSTERING ORDER BY ("fedAt" DESC);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS local_feed (
|
||||
"fedAtDate" date,
|
||||
"fedAt" timestamp,
|
||||
"noteId" ascii,
|
||||
"noteUserId" ascii,
|
||||
"noteUserHost" text,
|
||||
"replyUserId" ascii,
|
||||
"replyUserHost" text,
|
||||
"renoteUserId" ascii,
|
||||
"renoteUserHost" text,
|
||||
PRIMARY KEY ("fedAtDate", "fedAt")
|
||||
) WITH CLUSTERING ORDER BY ("fedAt" DESC);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS reaction (
|
||||
"id" text,
|
||||
"noteId" ascii,
|
||||
|
|
Loading…
Reference in a new issue