mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-07 14:48:44 +00:00
Drop canonical_id from tags
This commit is contained in:
@@ -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