Skip to content

Commit

Permalink
fix: migration script typo
Browse files Browse the repository at this point in the history
Fixes a small typo that prevents the migration script from running.
  • Loading branch information
jniles committed Jul 2, 2019
1 parent 78a657a commit bf1157a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/models/migrations/next/migrations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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();
-- update columns
call UpdatePeriodLabels();

0 comments on commit bf1157a

Please sign in to comment.