From 7f8ceb6d372ec80701b07511208e0d6746a9a1cc Mon Sep 17 00:00:00 2001 From: Bernat Date: Thu, 21 Jun 2018 07:27:17 +0200 Subject: [PATCH] add view saleTracking and ACL for news models --- services/db/install/changes/1.0.6/ACL.sql | 3 +++ .../db/install/changes/1.0.6/saleTracking.sql | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 services/db/install/changes/1.0.6/ACL.sql create mode 100644 services/db/install/changes/1.0.6/saleTracking.sql diff --git a/services/db/install/changes/1.0.6/ACL.sql b/services/db/install/changes/1.0.6/ACL.sql new file mode 100644 index 000000000..fb4ae6530 --- /dev/null +++ b/services/db/install/changes/1.0.6/ACL.sql @@ -0,0 +1,3 @@ +INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('85', 'SaleTracking', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('86', 'Order', '*', '*', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('87', 'OrderRow', '*', '*', 'ALLOW', 'ROLE', 'employee'); diff --git a/services/db/install/changes/1.0.6/saleTracking.sql b/services/db/install/changes/1.0.6/saleTracking.sql new file mode 100644 index 000000000..410985c08 --- /dev/null +++ b/services/db/install/changes/1.0.6/saleTracking.sql @@ -0,0 +1,15 @@ +CREATE + ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `saleTracking` AS + SELECT + `m`.`Id_Movimiento` AS `saleFk`, + `m`.`valor` AS `isChecked`, + `m`.`odbc_date` AS `created`, + `m`.`original_quantity` AS `originalQuantity`, + `m`.`Id_Trabajador` AS `workerFk`, + `m`.`Id_Accion` AS `actionFk`, + `m`.`Id_Movimiento_mark` AS `id` + FROM + `vn2008`.`Movimientos_mark` `m` \ No newline at end of file