From bf1157a4a414d5ab1291ac5439b87199bd4e3d68 Mon Sep 17 00:00:00 2001 From: Jonathan Niles Date: Tue, 2 Jul 2019 09:02:04 +0100 Subject: [PATCH] fix: migration script typo Fixes a small typo that prevents the migration script from running. --- server/models/migrations/next/migrations.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/models/migrations/next/migrations.sql b/server/models/migrations/next/migrations.sql index bde63893f2..4de7aa9ef9 100644 --- a/server/models/migrations/next/migrations.sql +++ b/server/models/migrations/next/migrations.sql @@ -2,7 +2,7 @@ delimiter $$ -- this Procedure help to make quick analyse about unbalanced invoice -- it create a table name 'unbalancedInvoices' that can be used by the analyser -DROP PROCEDURE IF EXISTS UnbalancedInvoicePaymentsTable$$ +DROP PROCEDURE IF EXISTS UnbalancedInvoicePayments$$ CREATE PROCEDURE UnbalancedInvoicePayments( IN dateFrom DATE, IN dateTo DATE @@ -228,7 +228,7 @@ DECLARE _id mediumint(8) unsigned; DECLARE _start_date, _end_date DATE; DECLARE done BOOLEAN; -DECLARE curs1 CURSOR FOR +DECLARE curs1 CURSOR FOR SELECT id, start_date, end_date FROM period; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; @@ -239,14 +239,14 @@ OPEN curs1; IF done THEN LEAVE read_loop; END IF; - UPDATE period SET - period.translate_key = CONCAT('TABLE.COLUMNS.DATE_MONTH.', UPPER(DATE_FORMAT(_start_date, "%M"))), - period.year = YEAR(_start_date) - WHERE period.id = _id; + UPDATE period SET + period.translate_key = CONCAT('TABLE.COLUMNS.DATE_MONTH.', UPPER(DATE_FORMAT(_start_date, "%M"))), + period.year = YEAR(_start_date) + WHERE period.id = _id; END LOOP; CLOSE curs1; END$$ DELIMITER ; --- update columns -call UpdatePeriodLabels(); \ No newline at end of file +-- update columns +call UpdatePeriodLabels();