add a couple post endpoints + /timelines/home
This commit is contained in:
parent
dd72a1f4c1
commit
9f052dc9ef
24 changed files with 462 additions and 32 deletions
12
internal/database/migrations/1693961486_follows.sql
Normal file
12
internal/database/migrations/1693961486_follows.sql
Normal 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;
|
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue