annotate database/schema/version.sql @ 56:42d7888272a0 default tip

Implement fetch_classifications().
author David A. Holland
date Sun, 10 Apr 2022 19:37:18 -0400
parents 40f64a96481f
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 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
2 -- Schema info.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
3 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
4 -- The schema version is stored in every PR when the PR is
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
5 -- entered; this helps reconstruct history.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
6 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
7 -- The schema version is also used for future-proofing.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
9 -- Should have only one row.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
10 CREATE TABLE schemainfo (
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
11 version int not null
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: 8
diff changeset
14
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 8
diff changeset
15 -- This is readonly except for system updates.
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 8
diff changeset
16 GRANT SELECT ON schemainfo TO swallowtail_admin;
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 8
diff changeset
17 GRANT SELECT ON schemainfo TO swallowtail_writer;
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 8
diff changeset
18 GRANT SELECT ON schemainfo TO swallowtail_reader;
40f64a96481f Adjust database user arrangements and grant schema privs.
David A. Holland
parents: 8
diff changeset
19 GRANT SELECT ON schemainfo TO swallowtail_public;