-- liquibase formatted sql
-- changeset cyril:update_job_order

ALTER TABLE `job_order`
    CHANGE COLUMN `jobPlanningLogId` `prodScheduleLineId` INT NULL DEFAULT NULL ,
    ADD INDEX `FK_JOB_ORDER_ON_PRODSCHEDULELINEID` (`prodScheduleLineId` ASC) VISIBLE;
;
ALTER TABLE `job_order`
    ADD CONSTRAINT `FK_JOB_ORDER_ON_PRODSCHEDULELINEID`
        FOREIGN KEY (`prodScheduleLineId`)
            REFERENCES `production_schedule_line` (`id`)
            ON DELETE RESTRICT
            ON UPDATE RESTRICT;