feat(F-106): completed feature
This commit is contained in:
15
project/migrations/036_order_tracking_number.js
Normal file
15
project/migrations/036_order_tracking_number.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* 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`);
|
||||
};
|
||||
Reference in New Issue
Block a user