annotate database/schema/logs.sql @ 55:40f64a96481f

Adjust database user arrangements and grant schema privs.
author David A. Holland
date Sun, 10 Apr 2022 19:36:29 -0400
parents cd36b49f4437
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
1 -- log of administrative changes over time
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
2 CREATE TABLE adminlog (
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
3 -- who (null means "swallowtail"), where, when, what, why
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
4 who bigint null references users (id),
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
5 pr bigint not null references PRs (id),
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
6 change text not null,
29
David A. Holland
parents: 12
diff changeset
7 posttime timestamp not null,
David A. Holland
parents: 12
diff changeset
8 comment text not null,
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
9
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
10 -- if a message was posted, this is the one
29
David A. Holland
parents: 12
diff changeset
11 msgid bigint null references messages (id)
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
12 )
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
13 WITHOUT OIDS;
55
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
14
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
15 -- We don't ordinarily edit or delete log entries. If you really need
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
16 -- to do that for some reason (e.g. mispasted passwords) log in as
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
17 -- swallowtail_owner.
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
18 GRANT SELECT, INSERT ON adminlog TO swallowtail_admin;
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
19 GRANT SELECT, INSERT ON adminlog TO swallowtail_writer;
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
20 GRANT SELECT ON adminlog TO swallowtail_reader;
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 29
diff changeset
21 GRANT SELECT ON adminlog TO swallowtail_public;