exports.up = (pgm) => { pgm.sql(` -- Where the link was sent (#260). Nullable, and deliberately so: links -- already exist in QA and a migration cannot invent an address for them, so -- they are grandfathered rather than backfilled with something untrue. -- -- The requirement lives in the create route instead, which is where new -- links are actually made. A NOT NULL column would have forced a choice -- between inventing data and refusing to migrate. ALTER TABLE upload_links ADD COLUMN IF NOT EXISTS contact_email TEXT; `); }; exports.down = (pgm) => { pgm.sql(`ALTER TABLE upload_links DROP COLUMN IF EXISTS contact_email;`); };