Merge pull request #54 from PR0M3TH3AN/codex/drop-canonical_id-column-from-tags-table

Remove canonical_id from tags
This commit is contained in:
thePR0M3TH3AN
2025-05-21 22:46:09 -04:00
committed by GitHub
3 changed files with 10 additions and 1 deletions

View File

@@ -17,7 +17,6 @@ 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) ON DELETE SET NULL,
UNIQUE(name, parent_id)
);

View File

@@ -0,0 +1,6 @@
PRAGMA foreign_keys = ON;
PRAGMA journal_mode = WAL;
-- Remove canonical_id column from tags table
ALTER TABLE tags DROP COLUMN canonical_id;

View File

@@ -41,6 +41,10 @@ const MIGRATIONS: &[(&str, &str)] = &[
"0005_add_dirty_table.sql",
include_str!("migrations/0005_add_dirty_table.sql"),
),
(
"0006_drop_tags_canonical_id.sql",
include_str!("migrations/0006_drop_tags_canonical_id.sql"),
),
];
/* ─── connection bootstrap ────────────────────────────────────────── */