Differences From
Artifact [6bf306c986]:
58 58 );
59 59
60 60 drop table if exists parsav_rights cascade;
61 61 create table parsav_rights (
62 62 key text,
63 63 actor bigint references parsav_actors(id)
64 64 on delete cascade,
65 - allow boolean,
65 + allow boolean not null,
66 + scope bigint, -- for future expansion
66 67
67 68 primary key (key,actor)
68 69 );
69 70
70 71 insert into parsav_actors (handle,rank,quota) values (:'admin',1,0);
71 72 insert into parsav_rights (actor,key,allow)
72 73 select (select id from parsav_actors where handle=:'admin'), a.column1, a.column2 from (values
73 - ('ban',true),
74 + ('purge',true),
74 75 ('config',true),
75 76 ('censor',true),
76 77 ('suspend',true),
78 + ('cred',true),
79 + ('elevate',true),
80 + ('demote',true),
77 81 ('rebrand',true)
78 82 ) as a;
79 83
80 84 drop table if exists parsav_posts cascade;
81 85 create table parsav_posts (
82 86 id bigint primary key default (1+random()*(2^63-1))::bigint,
83 87 author bigint references parsav_actors(id)