mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-08 07:08:44 +00:00
Merge pull request #54 from PR0M3TH3AN/codex/drop-canonical_id-column-from-tags-table
Remove canonical_id from tags
This commit is contained in:
@@ -17,7 +17,6 @@ CREATE TABLE IF NOT EXISTS tags (
|
|||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
name TEXT NOT NULL, -- tag segment
|
name TEXT NOT NULL, -- tag segment
|
||||||
parent_id INTEGER REFERENCES tags(id) ON DELETE CASCADE,
|
parent_id INTEGER REFERENCES tags(id) ON DELETE CASCADE,
|
||||||
canonical_id INTEGER REFERENCES tags(id) ON DELETE SET NULL,
|
|
||||||
UNIQUE(name, parent_id)
|
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",
|
"0005_add_dirty_table.sql",
|
||||||
include_str!("migrations/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 ────────────────────────────────────────── */
|
/* ─── connection bootstrap ────────────────────────────────────────── */
|
||||||
|
Reference in New Issue
Block a user