wip: pause checkpoint — P6 feature complete, gate interrupted (not for merge)
This commit is contained in:
1 parent
cc4f104f06
commit
ce36640874
68 files changed
+4592
-374
No files matched your search
@@ -5,7 +5,7 @@
|
||||
//! is the current version.
|
||||
|
||||
/// Current schema version.
|
||||
pub const SCHEMA_VERSION: u32 = 15;
|
||||
pub const SCHEMA_VERSION: u32 = 16;
|
||||
|
||||
/// Migrations, in order. `MIGRATIONS[i]` migrates from version `i` to `i+1`.
|
||||
pub const MIGRATIONS: &[&str] = &[
|
||||
@@ -396,5 +396,39 @@ ALTER TABLE invoices DROP COLUMN amount_paid;
|
||||
ALTER TABLE invoices DROP COLUMN status;
|
||||
ALTER TABLE bills DROP COLUMN amount_paid;
|
||||
ALTER TABLE bills DROP COLUMN status;
|
||||
"#,
|
||||
r#"
|
||||
-- v16: evidence (plan P6, feature attachment_text): what was read out of
|
||||
-- a file (`attachment.text_extracted`), the facts a human annotated it
|
||||
-- with (`attachment.annotated`), and the duplicate an attachment was
|
||||
-- withdrawn as. Extraction is its own record per (attachment, extractor,
|
||||
-- version): an extractor upgrade adds one, never replaces one. A text
|
||||
-- hash is the extraction's blob; the text itself is content-addressed in
|
||||
-- the blob store. Amounts stay TEXT (exact decimal), never REAL.
|
||||
CREATE TABLE IF NOT EXISTS extractions(
|
||||
attachment_id INTEGER NOT NULL,
|
||||
extractor TEXT NOT NULL,
|
||||
version TEXT NOT NULL,
|
||||
text_sha256 TEXT NULL,
|
||||
pages INTEGER NOT NULL,
|
||||
status TEXT NOT NULL,
|
||||
seq INTEGER NOT NULL,
|
||||
PRIMARY KEY(attachment_id, extractor, version)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_extractions_text ON extractions(text_sha256);
|
||||
CREATE TABLE IF NOT EXISTS annotations(
|
||||
attachment_id INTEGER PRIMARY KEY,
|
||||
receipt_number INTEGER NULL,
|
||||
payee TEXT NULL,
|
||||
amount TEXT NULL,
|
||||
date TEXT NULL,
|
||||
instrument TEXT NULL,
|
||||
category TEXT NULL,
|
||||
source TEXT NULL,
|
||||
reimbursable_to TEXT NULL,
|
||||
note TEXT NULL,
|
||||
seq INTEGER NOT NULL
|
||||
);
|
||||
ALTER TABLE attachments ADD COLUMN duplicate_of INTEGER NULL;
|
||||
"#,
|
||||
];
|
||||
Reference in new issue
Block a user