summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_forge.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index f40eac82d..ce505f4ee 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -333,6 +333,12 @@ class CI_DB_forge {
foreach ($field as $k => $v)
{
+ // If no name provided, use the current name
+ if ( ! isset($field[$k]['name']))
+ {
+ $field[$k]['name'] = $k;
+ }
+
$this->add_field(array($k => $field[$k]));
if (count($this->fields) == 0)