summaryrefslogtreecommitdiffstats
path: root/system/libraries/Migration.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-03-16 20:15:52 +0100
committerAndrey Andreev <narf@devilix.net>2016-03-16 20:15:52 +0100
commit3df07729b8018acd764a7a8a08f34f1579c43e5e (patch)
treed9ea40a128ccac252dea2e3747ed388845ba2401 /system/libraries/Migration.php
parentf8490b994c959de3e1eabba27d8d919433e3fc70 (diff)
A small Migrations tweak
Diffstat (limited to 'system/libraries/Migration.php')
-rw-r--r--system/libraries/Migration.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index 74bec3d60..316c94ae3 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -219,12 +219,17 @@ class CI_Migration {
{
$method = 'up';
}
- else
+ elseif ($target_version < $current_version)
{
$method = 'down';
// We need this so that migrations are applied in reverse order
krsort($migrations);
}
+ else
+ {
+ // Well, there's nothing to migrate then ...
+ return TRUE;
+ }
// Validate all available migrations within our target range.
//