-- liquibase formatted sql
-- changeset 2fi:20260526_03_truck_lane_schedule_line_actions
-- preconditions onFail:MARK_RAN
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'truck_lane_schedule_line' AND column_name = 'lineAction'

ALTER TABLE `truck_lane_schedule_line`
    ADD COLUMN `lineAction` VARCHAR(20) NOT NULL DEFAULT 'MOVE' AFTER `scheduleId`,
    ADD COLUMN `shopId` BIGINT NULL DEFAULT NULL AFTER `shopName`,
    ADD COLUMN `departureTime` TIME NULL DEFAULT NULL AFTER `toLoadingSequence`,
    ADD COLUMN `logisticId` BIGINT NULL DEFAULT NULL AFTER `departureTime`;

ALTER TABLE `truck_lane_schedule_line`
    MODIFY COLUMN `truckRowId` BIGINT NULL DEFAULT NULL,
    MODIFY COLUMN `fromTruckLanceCode` VARCHAR(100) NULL DEFAULT NULL,
    MODIFY COLUMN `fromStoreId` VARCHAR(10) NULL DEFAULT NULL;
