summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/core/Router.php4
-rw-r--r--system/database/DB_forge.php2
-rw-r--r--system/libraries/Migration.php10
3 files changed, 14 insertions, 2 deletions
diff --git a/system/core/Router.php b/system/core/Router.php
index 765e32374..ea4f4a4f7 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -258,6 +258,10 @@ class CI_Router {
{
$this->set_method($segments[1]);
}
+ else
+ {
+ $segments[1] = 'index';
+ }
array_unshift($segments, NULL);
unset($segments[0]);
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 21ef40119..111546ecc 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -408,7 +408,7 @@ abstract class CI_DB_forge {
}
// _create_table will usually have the following format: "%s %s (%s\n)"
- $sql = sprintf($this->_create_table.'%s;',
+ $sql = sprintf($this->_create_table.'%s',
$sql,
$this->db->escape_identifiers($table),
$columns,
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index b226ee804..9185adff1 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -186,7 +186,15 @@ class CI_Migration {
{
// Note: We use strings, so that timestamp versions work on 32-bit systems
$current_version = $this->_get_version();
- $target_version = (string) $target_version;
+
+ if ($this->_migration_type === 'sequential')
+ {
+ $target_version = str_pad($target_version, 3, '0', STR_PAD_LEFT);
+ }
+ else
+ {
+ $target_version = (string) $target_version;
+ }
$migrations = $this->find_migrations();