-- ═══════════════════════════════════════════════════════════════ -- 053 US SPELLING IN MESSAGES -- -- The site is written in US English now. Two of 041's CHECKs are -- named with the sentence the admin shows when a save breaks them -- (admin-crud.js), and those said "colour"; the table is rebuilt to -- rename them, the same columns and rows as before. -- -- events.status keeps the value 'cancelled': it's stored data, and -- the admin and the pages show it as "canceled". -- ═══════════════════════════════════════════════════════════════ CREATE TABLE site_setting_colors_new ( id INTEGER PRIMARY KEY AUTOINCREMENT, settings_id TEXT NOT NULL REFERENCES site_settings (id) ON DELETE CASCADE, sort_order INTEGER NOT NULL DEFAULT 0, token TEXT NOT NULL CHECK (token IN ( 'ink', 'body', 'muted', 'link', 'brand', 'action', 'action-hover', 'surface', 'tint', 'tint-soft', 'danger', 'danger-tint')), light TEXT CONSTRAINT "A color must be written #rrggbb, eg. #0f7183." CHECK (light IS NULL OR (length(light) = 7 AND light GLOB '#[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]')), dark TEXT CONSTRAINT "A dark color must be written #rrggbb, eg. #5ccbdc." CHECK (dark IS NULL OR (length(dark) = 7 AND dark GLOB '#[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]')), UNIQUE (settings_id, token) ) STRICT; INSERT INTO site_setting_colors_new (id, settings_id, sort_order, token, light, dark) SELECT id, settings_id, sort_order, token, light, dark FROM site_setting_colors; PRAGMA legacy_alter_table = ON; DROP TABLE site_setting_colors; ALTER TABLE site_setting_colors_new RENAME TO site_setting_colors; PRAGMA legacy_alter_table = OFF;