Fix duplicate migration 025 filename prefix

Renamed 025_preset_packs.sql → 030_preset_packs.sql and
030_pack_variable_extensions.sql → 031_pack_variable_extensions.sql
to match their actual version numbers (30 and 31) in lib.rs,
resolving the collision with 025_world_state_deltas.sql.
This commit is contained in:
munimunigamer 2026-02-17 20:23:37 -06:00
parent cc163c3aad
commit cbf3a4a38e
3 changed files with 3 additions and 2 deletions

View file

@ -0,0 +1,15 @@
-- Add description and sort_order to pack variables, and custom_variable_values to stories
ALTER TABLE pack_variables ADD COLUMN description TEXT;
ALTER TABLE pack_variables ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;
-- Initialize sort_order based on alphabetical position within each pack
UPDATE pack_variables SET sort_order = (
SELECT COUNT(*) FROM pack_variables pv2
WHERE pv2.pack_id = pack_variables.pack_id
AND pv2.variable_name < pack_variables.variable_name
);
-- Per-story custom variable value overrides (JSON object: { variableName: value })
ALTER TABLE stories ADD COLUMN custom_variable_values TEXT;