Skip to content

Commit

Permalink
This is a quickfix on DbDeployTask where in rare cases, there's not a…
Browse files Browse the repository at this point in the history
… 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
DragonBe committed Jun 5, 2014
1 parent 473fe20 commit 1132f85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions classes/phing/tasks/ext/dbdeploy/DbDeployTask.php
Expand Up @@ -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 . '
Expand Down

0 comments on commit 1132f85

Please sign in to comment.