···11create table blocks
22(
33- at_uri text primary key,
33+ rkey text not null,
44 did text not null references actors (did),
55 subject text not null,
66- created_at timestamptz not null
66+ created_at timestamptz not null,
77+88+ primary key (did, rkey)
79);
810911create index blocks_did_index on blocks (did);
···11131214create table follows
1315(
1414- at_uri text primary key,
1616+ rkey text not null,
1517 did text not null references actors (did),
1618 subject text not null,
1717- created_at timestamptz not null
1919+ created_at timestamptz not null,
2020+2121+ primary key (did, rkey)
1822);
19232024create index follow_did_index on follows (did);
···11create table likes
22(
33- at_uri text primary key,
33+ rkey text not null,
44 did text not null references actors (did),
55 subject text not null,
66 subject_cid text not null,
77 created_at timestamptz not null,
88- indexed_at timestamp not null default now()
88+ indexed_at timestamp not null default now(),
99+1010+ primary key (did, rkey)
911);
10121113create index likes_did_index on likes (did);
···13151416create table reposts
1517(
1616- at_uri text primary key,
1818+ rkey text not null,
1719 did text not null references actors (did),
1820 post text not null,
1921 post_cid text not null,
2022 created_at timestamptz not null,
2121- indexed_at timestamp not null default now()
2323+ indexed_at timestamp not null default now(),
2424+2525+ primary key (did, rkey)
2226);
23272428create index reposts_did_index on reposts (did);