#7187 add pda freelancers #2298

Merged
pablone merged 19 commits from 7187-addPdaFreelancers into dev 2024-05-17 11:35:20 +00:00
3 changed files with 12 additions and 1 deletions
Showing only changes of commit a15970c95f - Show all commits

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionUser_afterInsert`
AFTER INSERT ON `deviceProductionUser`
FOR EACH ROW
BEGIN
CALL worker_checkMultipleDevice(NEW.userFk);
END$$
DELIMITER ;

View File

@ -3,7 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionUser_
BEFORE INSERT ON `deviceProductionUser` BEFORE INSERT ON `deviceProductionUser`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
CALL worker_checkMultipleDevice(NEW.userFk);
SET NEW.editorFk = account.myUser_getId(); SET NEW.editorFk = account.myUser_getId();
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -4,3 +4,7 @@ ALTER TABLE vn.deviceProductionUser DROP FOREIGN KEY deviceProductionUser_FK;
ALTER TABLE vn.deviceProductionUser DROP PRIMARY KEY; ALTER TABLE vn.deviceProductionUser DROP PRIMARY KEY;
ALTER TABLE vn.deviceProductionUser ADD id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY FIRST; ALTER TABLE vn.deviceProductionUser ADD id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY FIRST;
ALTER TABLE vn.deviceProductionUser ADD CONSTRAINT deviceProductionUser_deviceProduction_FK FOREIGN KEY (deviceProductionFk) REFERENCES vn.deviceProduction(id);
ALTER TABLE vn.deviceProductionUser ADD CONSTRAINT deviceProductionUser_unique UNIQUE KEY (deviceProductionFk);