From ac1d9ddfccc8a5ca4386c06fcaf50e7371828e1d Mon Sep 17 00:00:00 2001 From: Bernat Date: Thu, 11 Oct 2018 07:45:51 +0200 Subject: [PATCH] update structure db --- .../db/install/changes/1.2-CHECK/09.defaulters.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 services/db/install/changes/1.2-CHECK/09.defaulters.sql diff --git a/services/db/install/changes/1.2-CHECK/09.defaulters.sql b/services/db/install/changes/1.2-CHECK/09.defaulters.sql new file mode 100644 index 000000000..ce38e8c71 --- /dev/null +++ b/services/db/install/changes/1.2-CHECK/09.defaulters.sql @@ -0,0 +1,14 @@ +USE `vn`; +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `vn`.`defaulter` AS + SELECT + `d`.`client` AS `clientFk`, + `d`.`date` AS `created`, + `d`.`amount` AS `amount`, + `d`.`defaulterSince` AS `defaulterSinced`, + `d`.`hasChanged` AS `hasChanged` + FROM + `bi`.`defaulters` `d`;