Skip to content

Commit

Permalink
catch not ready to migrate exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Sep 20, 2017
1 parent d400b1e commit 1ab25bc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: php
php:
- 5.5
- 5.6
- hhvm
- 7
script:
- phpunit -c tests/phpunit.xml --coverage-clover=coverage.clover
Expand Down
2 changes: 2 additions & 0 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public function migrate($direction = MigrationInterface::DIRECTION_UP)
$result->attach($item);
} catch (AlreadyMigratedException $e) {
/** we will not execute migrations that are already executed */
} catch (NotReadyToMigrateException $e) {
/** we will not execute migrations that are not ready to be executed */
}
}

Expand Down
12 changes: 12 additions & 0 deletions src/NotReadyToMigrateException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
namespace Genkgo\Migrations;

use RuntimeException;

/**
* Class NotReadyToMigrateException
* @package Genkgo\Migrations
*/
class NotReadyToMigrateException extends RuntimeException
{
}

0 comments on commit 1ab25bc

Please sign in to comment.