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 <cursoragent@cursor.com>
This commit is contained in:
Randall Stillwell 2026-06-02 10:58:43 -05:00
parent 898d3973c0
commit b79e9456b6

View file

@ -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