From b55a258760beaaff322ee4bd634eb3a383ee51c9 Mon Sep 17 00:00:00 2001 From: Jeremy Bush Date: Thu, 12 May 2011 14:52:00 -0500 Subject: [PATCH] Fix bug where migrations to +/- would not work properly. Fixes #16 --- classes/model/minion/migration.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/model/minion/migration.php b/classes/model/minion/migration.php index 0d505f1..d90c15f 100644 --- a/classes/model/minion/migration.php +++ b/classes/model/minion/migration.php @@ -444,6 +444,12 @@ class Model_Minion_Migration extends Model return array(NULL, $up); } - return array((string) $query->execute($this->_db)->get('timestamp'), $up); + // Seek to the requested row + for ($i = 0; $i < $amount - 1; $i++) + { + $results->next(); + } + + return array((string) $results->get('timestamp'), $up); } }