feat(POS-FIX-11): completed feature

This commit is contained in:
chattie
2026-08-24 08:13:43 +02:00
parent 579e0a18eb
commit d103b634aa
13 changed files with 207 additions and 13 deletions

View 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;
`);
};