From ae0ce91127bd780e33ab9263fd3cb0edd09276bd Mon Sep 17 00:00:00 2001 From: davidd Date: Fri, 16 Feb 2024 06:10:09 +0100 Subject: [PATCH] refs #6685 --- db/routines/vn2008/views/credit.sql | 11 +++++++++++ db/versions/10888-brownBirch/00-firstScript.sql | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 db/routines/vn2008/views/credit.sql create mode 100644 db/versions/10888-brownBirch/00-firstScript.sql diff --git a/db/routines/vn2008/views/credit.sql b/db/routines/vn2008/views/credit.sql new file mode 100644 index 000000000..04b44f42b --- /dev/null +++ b/db/routines/vn2008/views/credit.sql @@ -0,0 +1,11 @@ +CREATE OR REPLACE DEFINER=`root`@`localhost` + SQL SECURITY DEFINER + VIEW `vn2008`.`credit` +AS SELECT + `c`.`id` AS `id`, + `c`.`clientFk` AS `Id_Cliente`, + `c`.`workerFk` AS `Id_Trabajador`, + `c`.`amount` AS `amount`, + `c`.`created` AS `odbc_date` +FROM + `vn`.`clientCredit` `c` \ No newline at end of file diff --git a/db/versions/10888-brownBirch/00-firstScript.sql b/db/versions/10888-brownBirch/00-firstScript.sql new file mode 100644 index 000000000..7c8f96339 --- /dev/null +++ b/db/versions/10888-brownBirch/00-firstScript.sql @@ -0,0 +1,6 @@ +CREATE OR REPLACE DEFINER=`root`@`localhost` + SQL SECURITY DEFINER +VIEW `vn2008`.`credit`AS + SELECT 1; + +GRANT SELECT ON TABLE vn2008.credit TO financialBoss;