Files

16 lines
640 B
SQL
Raw Permalink Normal View History

ALTER TABLE projects ADD COLUMN icon_id text NOT NULL DEFAULT '' CHECK (char_length(icon_id) <= 64);
-- Existing installations have never offered icon selection. Seed familiar names
-- once; subsequent migrations/logins must preserve explicit changes or removal.
UPDATE projects SET icon_id = CASE name
WHEN '零基础' THEN 'plie'
WHEN '基础提升' THEN 'tendu'
WHEN '软开素质' THEN 'flexibility'
WHEN '足髋训练' THEN 'foot-hip'
WHEN '核心臀腿' THEN 'core-glutes'
WHEN '小球核心' THEN 'ball-core'
WHEN '天鹅臂颈' THEN 'swan-arms'
WHEN '呼吸训练' THEN 'breathing'
ELSE ''
END;