Files
dashback/scripts/migrate-parent-rename.sqlite.sql
2026-10-04 21:22:00 +02:00

14 lines
575 B
SQL

-- Rename article "father" columns to "parent".
--
-- One-off manual migration (no migration code is kept in the repo).
-- sqlite3 data/dash.db < scripts/migrate-parent-rename.sqlite.sql
--
-- Safe to re-run: every step is guarded by a column-existence check.
ALTER TABLE article RENAME COLUMN fatherarticle_id TO parentarticle_id;
ALTER TABLE article RENAME COLUMN fatherattributename_id TO parentattributename_id;
ALTER TABLE article RENAME COLUMN fathersort TO parentsort;
ALTER TABLE article RENAME COLUMN is_father TO is_parent;
-- Verify
PRAGMA table_info(article);