Differences From
Artifact [cb277a93b1]:
24 24
25 25 create table parsav_actors (
26 26 id bigint primary key default (1+random()*(2^63-1))::bigint,
27 27 nym text,
28 28 handle text not null, -- nym [@handle@origin]
29 29 origin bigint references parsav_servers(id)
30 30 on delete cascade, -- null origin = local actor
31 - knownsince timestamp,
31 + knownsince timestamp not null default now(),
32 32 bio text,
33 33 avatarid bigint, -- artifact id, null if remote
34 34 avataruri text, -- null if local
35 35 rank smallint not null default 0,
36 36 quota integer not null default 1000,
37 37 key bytea, -- private if localactor; public if remote
38 38 epithet text,
................................................................................
56 56 author bigint references parsav_actors(id)
57 57 on delete cascade,
58 58 subject text,
59 59 acl text not null default 'all', -- just store the script raw 🤷
60 60 body text,
61 61 posted timestamp not null,
62 62 discovered timestamp not null,
63 + chgcount integer not null default 0,
64 + edited timestamp,
63 65 parent bigint not null default 0, -- if post: part of conversation; if chatroom: top-level post
64 66 circles bigint[], -- TODO at edit or creation, iterate through each circle
65 67 mentions bigint[], -- a user has, check if it can see her post, and if so add
66 68 artifacts bigint[],
67 69
68 70 convoheaduri text
69 71 -- only used for tracking foreign conversations and tying them to post heads;