Skip to content

Commit a26509c

Browse files
committed
Fix offset migrations
fix ruckus#153
1 parent 6f264c3 commit a26509c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/Task/Db/Migrate.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,12 @@ private function migrate_from_offset($steps, $current_version, $direction)
173173
$this->_return .= "\nsteps: " . $steps . " $direction\n";
174174
}
175175

176-
// If we are not at the bottom then adjust our index (to satisfy array_slice)
177176
if ($current_index == -1 && $direction === 'down') {
178177
$available = array();
179178
} else {
180-
if ($direction === 'up') {
181-
$current_index += 1;
182-
} else {
183-
$current_index += $steps;
184-
}
179+
// If we are not at the bottom then adjust our index (to satisfy array_slice)
180+
$current_index += 1;
181+
185182
// check to see if we have enough migrations to run - the user
186183
// might have asked to run more than we have available
187184
$available = array_slice($migrations, $current_index, $steps);

0 commit comments

Comments
 (0)