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:
parent
898d3973c0
commit
b79e9456b6
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue