Permalink
Browse files

This is a quickfix on DbDeployTask where in rare cases, there's not a…

… newline at the end of last delta.

This creates a statement like the following example:

    -- //UPDATE changelog

So the last deltaset prevents the query to update changelog table to finalise the process.
  • Loading branch information...
1 parent 473fe20 commit 1132f85b97286cc143b0d7ab6e938c7d04f72d77 @DragonBe DragonBe committed Jun 5, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 classes/phing/tasks/ext/dbdeploy/DbDeployTask.php
@@ -269,6 +269,8 @@ protected function generateSql($undo = false)
AND delta_set = \'' . $this->deltaSet . '\';' . "\n";
} else {
$sql .= substr($contents, 0, $split);
+ // Ensuring there's a newline after the final -- //
+ $sql .= PHP_EOL;
$sql .= 'UPDATE ' . DbDeployTask::$TABLE_NAME . '
SET complete_dt = ' . $this->dbmsSyntax->generateTimestamp() . '
WHERE change_number = ' . $fileChangeNumber . '

0 comments on commit 1132f85

Please sign in to comment.