update structure db

This commit is contained in:
Bernat 2018-10-02 07:28:12 +02:00
parent 82fba82f2d
commit 6875e7da11
3 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,2 @@
ALTER TABLE `vn`.`clientLog`
CHANGE COLUMN `newInstance` `newInstance` TEXT NULL DEFAULT NULL ;

View File

@ -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 ;