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