Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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