-- liquibase formatted sql
-- changeset cyril:update_pick_order

ALTER TABLE `pick_order`
    ADD COLUMN `releasedDate` DATETIME NULL DEFAULT NULL AFTER `targetDate`,
    ADD COLUMN `assignTo` INT NULL DEFAULT NULL AFTER `releasedBy`,
    ADD INDEX `FK_PICK_ORDER_ON_ASSIGNTO` (`assignTo` ASC) VISIBLE;
;
ALTER TABLE `pick_order`
    ADD CONSTRAINT `FK_PICK_ORDER_ON_ASSIGNTO`
        FOREIGN KEY (`assignTo`)
            REFERENCES `user` (`id`)
            ON DELETE RESTRICT
            ON UPDATE RESTRICT;
