feat(POS-FIX-11): completed feature
This commit is contained in:
23
project/migrations/059_pos_pending_label.js
Normal file
23
project/migrations/059_pos_pending_label.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* POS-FIX-11: Add pos_label field for pending sales identification
|
||||
* Allows naming a pending sale for easier identification when no customer is associated.
|
||||
* @param {import('node-pg-migrate').MigrationBuilder} pgm
|
||||
*/
|
||||
export const up = (pgm) => {
|
||||
pgm.sql(`
|
||||
ALTER TABLE orders_orders
|
||||
ADD COLUMN IF NOT EXISTS pos_label text;
|
||||
`);
|
||||
pgm.sql(`
|
||||
COMMENT ON COLUMN orders_orders.pos_label IS 'Optional label/name for pending POS sales without customer';
|
||||
`);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {import('node-pg-migrate').MigrationBuilder} pgm
|
||||
*/
|
||||
export const down = (pgm) => {
|
||||
pgm.sql(`
|
||||
ALTER TABLE orders_orders DROP COLUMN IF EXISTS pos_label;
|
||||
`);
|
||||
};
|
||||
Reference in New Issue
Block a user