From 0e077314a612b356fe9a1f6062cff1c33920a068 Mon Sep 17 00:00:00 2001 From: Bernat Date: Wed, 23 May 2018 08:54:37 +0200 Subject: [PATCH] add new procedure in the BD --- services/db/import-changes.js | 1 + .../changes/1.0.5/18-agencyHourListOffer.sql | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 services/db/install/changes/1.0.5/18-agencyHourListOffer.sql diff --git a/services/db/import-changes.js b/services/db/import-changes.js index 5a797bc6a..b72efaa3c 100644 --- a/services/db/import-changes.js +++ b/services/db/import-changes.js @@ -21,6 +21,7 @@ const fs = require('fs-extra'); for (let dir of dirs) { if (compareVersions(dir, version) <= 0) continue; + if (/^\./.test(dir)) continue; let path = `${changesDir}/${dir}`; let files = await fs.readdir(path); files.sort(); diff --git a/services/db/install/changes/1.0.5/18-agencyHourListOffer.sql b/services/db/install/changes/1.0.5/18-agencyHourListOffer.sql new file mode 100644 index 000000000..331428e20 --- /dev/null +++ b/services/db/install/changes/1.0.5/18-agencyHourListOffer.sql @@ -0,0 +1,17 @@ +USE `vn`; +DROP procedure IF EXISTS `agencyHourListOffer`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `agencyHourListOffer`(vDate DATE, vAddressFk INT, vAgencyFk INT) +BEGIN + + CALL vn.agencyHourOffer(vDate, vAddressFk, vAgencyFk); + + SELECT * FROM tmp.agencyHourOffer; + + DROP TEMPORARY TABLE tmp.agencyHourOffer; + +END$$ + +DELIMITER ; \ No newline at end of file