diff --git a/services/db/install/changes/1.2-CHECK/02-beforeInsertItemLog.sql b/services/db/install/changes/1.2-CHECK/02-beforeInsertItemLog.sql new file mode 100644 index 000000000..f3e9c6f4a --- /dev/null +++ b/services/db/install/changes/1.2-CHECK/02-beforeInsertItemLog.sql @@ -0,0 +1,11 @@ +DROP TRIGGER IF EXISTS `vn`.`itemLog_BEFORE_INSERT`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` TRIGGER `vn`.`itemLog_BEFORE_INSERT` BEFORE INSERT ON `itemLog` FOR EACH ROW +BEGIN + IF NEW.newInstance is NULL THEN + SET NEW.newInstance = NEW.description; + END IF; +END$$ +DELIMITER ; diff --git a/services/db/install/changes/1.2-CHECK/03-beforeInsertClientLog.sql b/services/db/install/changes/1.2-CHECK/03-beforeInsertClientLog.sql new file mode 100644 index 000000000..ec6b31e76 --- /dev/null +++ b/services/db/install/changes/1.2-CHECK/03-beforeInsertClientLog.sql @@ -0,0 +1,11 @@ +DROP TRIGGER IF EXISTS `vn`.`ticketLog_BEFORE_INSERT`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` TRIGGER `vn`.`ticketLog_BEFORE_INSERT` BEFORE INSERT ON `ticketLog` FOR EACH ROW +BEGIN + IF NEW.newInstance is NULL THEN + SET NEW.newInstance = NEW.description; + END IF; +END$$ +DELIMITER ; diff --git a/services/db/install/changes/1.2-CHECK/05-beforeInsertClaimLog.sql b/services/db/install/changes/1.2-CHECK/05-beforeInsertClaimLog.sql new file mode 100644 index 000000000..37fa97755 --- /dev/null +++ b/services/db/install/changes/1.2-CHECK/05-beforeInsertClaimLog.sql @@ -0,0 +1,11 @@ +DROP TRIGGER IF EXISTS `vn`.`claimLog_BEFORE_INSERT`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` TRIGGER `vn`.`claimLog_BEFORE_INSERT` BEFORE INSERT ON `claimLog` FOR EACH ROW +BEGIN + IF NEW.newInstance is NULL THEN + SET NEW.newInstance = NEW.description; + END IF; +END$$ +DELIMITER ; diff --git a/services/db/install/changes/1.2-CHECK/06-beforeInsertTicketLog.sql b/services/db/install/changes/1.2-CHECK/06-beforeInsertTicketLog.sql new file mode 100644 index 000000000..357f2a80d --- /dev/null +++ b/services/db/install/changes/1.2-CHECK/06-beforeInsertTicketLog.sql @@ -0,0 +1,11 @@ +DROP TRIGGER IF EXISTS `vn`.`clientLog_BEFORE_INSERT`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` TRIGGER `vn`.`clientLog_BEFORE_INSERT` BEFORE INSERT ON `clientLog` FOR EACH ROW +BEGIN + IF NEW.newInstance is NULL THEN + SET NEW.newInstance = NEW.description; + END IF; +END$$ +DELIMITER ;