feat: refs #8227 Roadmap changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2025-01-27 11:04:34 +01:00
parent 609df98614
commit 75168eef91
4 changed files with 10 additions and 2 deletions

View File

@ -22,7 +22,7 @@ BEGIN
SET vDaysDiff = DATEDIFF(vDateToPaste, vDateToCopy);
IF vDaysDiff IS NULL OR NOT vDaysDiff THEN
IF vDaysDiff IS NULL THEN
CALL util.throw("No valid dates");
END IF;

View File

@ -8,5 +8,8 @@ BEGIN
CALL util.throw('Departure time can not be after arrival time');
END IF;
SET NEW.name = UCASE(NEW.name);
IF NEW.`trailerPlate` IS NOT NULL THEN
SET NEW.m3 = (SELECT m3 FROM vehicle WHERE numberPlate = NEW.trailerPlate);
END IF;
END$$
DELIMITER ;

View File

@ -8,5 +8,8 @@ BEGIN
CALL util.throw('Departure time can not be after arrival time');
END IF;
SET NEW.name = UCASE(NEW.name);
IF NOT (NEW.`trailerPlate` <=> OLD.`trailerPlate`) THEN
SET NEW.m3 = (SELECT m3 FROM vehicle WHERE numberPlate = NEW.trailerPlate);
END IF;
END$$
DELIMITER ;

View File

@ -11,4 +11,6 @@ ALTER TABLE vn.roadmap
ALTER TABLE vn.roadmap
CHANGE driver1Fk driverFk int(10) unsigned DEFAULT NULL NULL COMMENT 'Conductor principal' AFTER driverName,
CHANGE driver2Fk codriverFk int(10) unsigned DEFAULT NULL NULL COMMENT 'Copiloto' AFTER driverFk,
CHANGE userFk editorFk int(10) unsigned DEFAULT NULL NULL AFTER m3;
CHANGE userFk editorFk int(10) unsigned DEFAULT NULL NULL AFTER m3;
CREATE INDEX roadmap_etd_IDX USING BTREE ON vn.roadmap (etd);