7596-devToTest_2426 #2600

Merged
alexm merged 115 commits from 7596-devToTest_2426 into test 2024-06-18 06:19:51 +00:00
2 changed files with 18 additions and 0 deletions
Showing only changes of commit 85d68890b8 - Show all commits

View File

@ -0,0 +1,9 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimRatio_afterInsert`
AFTER INSERT ON `claimRatio`
FOR EACH ROW
BEGIN
INSERT INTO clientRate(clientFk, `value`)
VALUES(NEW.clientFk, NEW.priceIncreasing);
END$$
DELIMITER ;

View File

@ -0,0 +1,9 @@
CREATE TABLE `vn`.`clientRate` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL,
`dated` date NOT NULL DEFAULT current_timestamp(),
`value` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `clientRate_unique` (`clientFk`,`dated`),
CONSTRAINT `clientRate_client_FK` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;