exports.up = (pgm) => { pgm.sql(` -- New items are staged, not published. Before this an item was live on the -- storefront the instant it was created, with no way to add something, look -- at it, and then decide it was ready. -- -- Only the default changes. Existing rows keep whatever status they have — -- backfilling would un-publish the entire live catalogue, which is the one -- thing this migration must not do. ALTER TABLE items ALTER COLUMN status SET DEFAULT 'pending'; `); }; exports.down = (pgm) => { pgm.sql(` ALTER TABLE items ALTER COLUMN status SET DEFAULT 'available'; `); };