| 37704 |
amit |
1 |
-- Reopening a delayed internal movement PO.
|
|
|
2 |
--
|
|
|
3 |
-- POScheduler ages a purchase order off createdAt, and createdAt is the PO date - so a PO reopened after the
|
|
|
4 |
-- auto-close window is immediately older than the window again and the next tick closes it straight back. This
|
|
|
5 |
-- column records when a PO was reopened; the scheduler ages off that instead when it is set, giving a reopened PO
|
|
|
6 |
-- the same fresh window a new one gets.
|
|
|
7 |
--
|
|
|
8 |
-- Additive and nullable: existing rows keep behaving exactly as before.
|
|
|
9 |
ALTER TABLE warehouse.purchaseorder
|
|
|
10 |
ADD COLUMN reopenedAt DATETIME NULL COMMENT 'When this PO was last reopened; POScheduler ages from this when set';
|