-- Version20260607120000
-- Add agency and action fields to dimensioner_station; add dimensioner_action to agency and maincompany

ALTER TABLE `dimensioner_station` ADD COLUMN `agency_id` INT DEFAULT NULL AFTER `maincompany_id`;
ALTER TABLE `dimensioner_station` ADD COLUMN `action` VARCHAR(20) DEFAULT NULL AFTER `notes`;
ALTER TABLE `dimensioner_station` ADD INDEX `idx_dimensioner_station_agency` (`agency_id`);
ALTER TABLE `dimensioner_station` ADD CONSTRAINT `fk_dimensioner_station_agency` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON DELETE SET NULL;

ALTER TABLE `agency` ADD COLUMN `dimensioner_action` VARCHAR(20) DEFAULT NULL;

ALTER TABLE `maincompany` ADD COLUMN `dimensioner_action` VARCHAR(20) DEFAULT NULL;
