#7187 add pda freelancers #2298
|
@ -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 ;
|
|
@ -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 ;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue