Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions lib/Task/Db/Migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,12 @@ private function migrate_from_offset($steps, $current_version, $direction)
$this->_return .= "\nsteps: " . $steps . " $direction\n";
}

// If we are not at the bottom then adjust our index (to satisfy array_slice)
if ($current_index == -1 && $direction === 'down') {
$available = array();
} else {
if ($direction === 'up') {
$current_index += 1;
} else {
$current_index += $steps;
}
// If we are not at the bottom then adjust our index (to satisfy array_slice)
$current_index += 1;

// check to see if we have enough migrations to run - the user
// might have asked to run more than we have available
$available = array_slice($migrations, $current_index, $steps);
Expand Down