Skip to content

Commit

Permalink
Merge #3775
Browse files Browse the repository at this point in the history
3775: fix: migration script typo r=jniles a=jniles

Fixes a small typo that prevents the migration script from running.

Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com>
  • Loading branch information
bors[bot] and jniles committed Jul 8, 2019
2 parents f50b9c6 + bf1157a commit ce8af95
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 ce8af95

Please sign in to comment.