From b79e9456b6d044e8a685f8645d2d9a5cfc5aef1e Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Tue, 2 Jun 2026 10:58:43 -0500 Subject: [PATCH] fix(migrations): ensure is_system_collection exists before description backfill. Fresh CI Postgres runs initial-schema without this column (added historically via scripts); ADD COLUMN IF NOT EXISTS makes the data migration safe on new and existing envs. Co-authored-by: Cursor --- migrations/1780378340194_system-collection-description.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migrations/1780378340194_system-collection-description.js b/migrations/1780378340194_system-collection-description.js index 89b2abb..2998024 100644 --- a/migrations/1780378340194_system-collection-description.js +++ b/migrations/1780378340194_system-collection-description.js @@ -13,6 +13,9 @@ export const shorthands = undefined; */ export const up = (pgm) => { pgm.sql(` + ALTER TABLE collections + ADD COLUMN IF NOT EXISTS is_system_collection BOOLEAN DEFAULT false; + UPDATE collections SET description = 'Automatically syncs with My Collection. This list cannot be deleted or made public.' WHERE is_system_collection = true