exports.up = (pgm) => { pgm.sql(` -- What the customer calls this passkey (#38). -- -- Not in the #37 groundwork because that issue listed the columns the -- ceremony needs and this one is for the person: the management screen (#40) -- shows a list, and "phone" against "laptop" is the only thing that makes -- two entries tellable apart. Without it a customer revoking a credential is -- choosing between identical rows. -- -- NOT NULL with a default rather than nullable. Every row must be -- displayable, and a null would push the "or a sensible default" half of the -- requirement out into every read site. The route derives a better default -- from the authenticator's transports; this is the floor under that, and the -- value existing rows take. ALTER TABLE customer_credentials ADD COLUMN IF NOT EXISTS name TEXT NOT NULL DEFAULT 'Passkey'; `); }; exports.down = (pgm) => { pgm.sql(`ALTER TABLE customer_credentials DROP COLUMN IF EXISTS name;`); };