add a couple post endpoints + /timelines/home

This commit is contained in:
sam 2023-09-06 16:32:33 +02:00
parent dd72a1f4c1
commit 9f052dc9ef
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
24 changed files with 462 additions and 32 deletions

View file

@ -0,0 +1,12 @@
-- 2023-09-06: Account->blog follows
-- +migrate Up
create table account_follows (
account_id text not null references accounts (id) on delete cascade,
blog_id text not null references blogs (id) on delete cascade
);
-- +migrate Down
drop table account_follows;

View file

@ -0,0 +1,19 @@
-- 2023-09-06: Some improvements to posts
-- +migrate Up
alter table config add column post_character_limit integer not null default 5000;
create index posts_blog_id_idx on posts (blog_id);
create table post_recipients (
post_id TEXT NOT NULL REFERENCES posts (id) ON DELETE CASCADE,
blog_id TEXT NOT NULL REFERENCES blogs (id) ON DELETE CASCADE,
PRIMARY KEY (post_id, blog_id)
);
-- +migrate Down
drop table post_recipients;
drop index posts_blog_id_idx;
alter table config drop column post_character_limit;