Skip to content

Commit

Permalink
Merge pull request #8 from Arbuzov/master
Browse files Browse the repository at this point in the history
Small fix to work whith unconsistend data
  • Loading branch information
byo committed Jan 11, 2015
2 parents 8039193 + f74e906 commit 9115a4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/cases/config.ini
/db
/.buildpath
/.settings
2 changes: 1 addition & 1 deletion lib/migrateController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function runStrategy()

$unapplied_migrations = array_diff($migrations, $revisions);

if(empty($unapplied_migrations) && $revision == max($migrations) && $target_migration > $revision)
if(empty($migrations)||(empty($unapplied_migrations) && $revision == max($migrations) && $target_migration > $revision))
{
echo 'No new migrations available' . PHP_EOL;
return true;
Expand Down

0 comments on commit 9115a4e

Please sign in to comment.