oficina / docs Public

Clone
git clone https://amadan.net/oficina/docs

Plain git — no account needed to clone.

Download

Download this file

1-- One index for the question every bump now asks of suite_feed: does this
2-- document's log already hold the revision just drawn? Suite revision 11
3-- (§6.6, suite main 91affa1) makes a revision unique per item against every
4-- revision the log holds for it, not only the current one, so bumpRevision
5-- redraws on any match (logRevisionTaken). Every applied update bumps and
6-- the log is append-only, so without this the probe is a scan of a table
7-- that only grows. It serves Rule's history read (issued) too, which asks
8-- the same (document, revision) pairs.
9--
10-- UNIQUE (Fable's review of db4a14c): the invariant is then the schema's
11-- and not only bumpRevision's, so a future path that announces without
12-- bumping fails loudly instead of reissuing a revision.
13CREATE UNIQUE INDEX IF NOT EXISTS suite_feed_document_revision ON suite_feed (document_id, revision);
14