16 lines
478 B
JavaScript
16 lines
478 B
JavaScript
/**
|
|
* Adds shipment tracking to orders. The tracking number is set when an order
|
|
* transitions to SHIPPED and is included in the customer notification.
|
|
* @param {import('node-pg-migrate').MigrationBuilder} pgm
|
|
*/
|
|
export const up = (pgm) => {
|
|
pgm.sql(`
|
|
ALTER TABLE orders_orders
|
|
ADD COLUMN IF NOT EXISTS tracking_number text NULL DEFAULT NULL
|
|
`);
|
|
};
|
|
|
|
export const down = (pgm) => {
|
|
pgm.sql(`ALTER TABLE orders_orders DROP COLUMN IF EXISTS tracking_number`);
|
|
};
|