mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2026-10-27 08:51:00 +00:00
Drop canonical_id from tags
This commit is contained in:
1 parent
2e6058a529
commit
794180ac18
3 files changed
+10
-1
No files matched your search
@@ -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)
|
||||
);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ────────────────────────────────────────── */
|
||||
|
||||
Reference in new issue
Block a user