oficina / docs Public

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

Plain git — no account needed to clone.

Download

Download this file

1-- doc_import_reports holds the report an import made, one per imported
2-- document: codes, counts and paragraph numbers saying what the import
3-- could not bring in, never the document's text. It is written in the
4-- same transaction as the document row and its first update
5-- (Store.CreateImported), so a report never exists without its document
6-- or a document without its report, and it follows the content-sealing
7-- rules the update log does (content_encoding 1 is sealed under the
8-- content key with its own kind byte; 0 only before activation).
9--
10-- Additive: creates a table, touches no existing row.
11CREATE TABLE IF NOT EXISTS doc_import_reports (
12 id INTEGER PRIMARY KEY AUTOINCREMENT,
13 doc_id INTEGER NOT NULL UNIQUE REFERENCES documents(id) ON DELETE CASCADE,
14 report_bin BLOB NOT NULL,
15 content_encoding INTEGER NOT NULL DEFAULT 0,
16 created_at DATETIME NOT NULL
17);
18