Merge pull request #58 from PR0M3TH3AN/codex/fix-migration-issue-with-missing-column

Fix migrations when opening new DB
This commit is contained in:
thePR0M3TH3AN
2025-05-22 10:28:25 -04:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ CREATE TABLE IF NOT EXISTS tags (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL, -- tag segment
parent_id INTEGER REFERENCES tags(id) ON DELETE CASCADE,
canonical_id INTEGER REFERENCES tags(id),
UNIQUE(name, parent_id)
);

View File

@@ -21,7 +21,7 @@ use tracing::{debug, info, warn};
/* ─── schema version ───────────────────────────────────────────────── */
/// Current library schema version.
pub const SCHEMA_VERSION: i32 = 1_1;
pub const SCHEMA_VERSION: i32 = MIGRATIONS.len() as i32;
/* ─── embedded migrations ─────────────────────────────────────────── */