Commit 765dcc8b by Taylor Otwell

tweaking the migrator.

parent 3569edbb
...@@ -78,7 +78,7 @@ class Migrator extends Task { ...@@ -78,7 +78,7 @@ class Migrator extends Task {
// We need to grab the latest batch ID and increment it // We need to grab the latest batch ID and increment it
// by one. This allows us to group the migrations such // by one. This allows us to group the migrations such
// that we can easily determine which migrations need // that we can easily determine which migrations need
// to be rolled back for a given command. // to roll back for the command.
$batch = $this->database->batch() + 1; $batch = $this->database->batch() + 1;
foreach ($migrations as $migration) foreach ($migrations as $migration)
...@@ -89,7 +89,7 @@ class Migrator extends Task { ...@@ -89,7 +89,7 @@ class Migrator extends Task {
// After running a migration, we log its execution in the // After running a migration, we log its execution in the
// migration table so that we can easily determine which // migration table so that we can easily determine which
// migrations we will need to reverse on a rollback. // migrations we'll reverse on a rollback.
$this->database->log($migration['bundle'], $migration['name'], $batch); $this->database->log($migration['bundle'], $migration['name'], $batch);
} }
} }
...@@ -124,7 +124,7 @@ class Migrator extends Task { ...@@ -124,7 +124,7 @@ class Migrator extends Task {
// By only removing the migration after it has successfully rolled back, // By only removing the migration after it has successfully rolled back,
// we can re-run the rollback command in the event of any errors with // we can re-run the rollback command in the event of any errors with
// the migration. When we re-run, only the migrations that have not // the migration. When we re-run, only the migrations that have not
// been rolled-back for the batch will still be in the database. // been rolled back for the batch will still be in the database.
$this->database->delete($migration['bundle'], $migration['name']); $this->database->delete($migration['bundle'], $migration['name']);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment