summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2010-12-15 11:32:10 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2010-12-15 11:32:10 +0100
commita58ecae8e149fe8e1fa9ee3cc9c9ad23a67ab8b6 (patch)
tree5b9d3fd4a9ec6245eb77236d58e02ee129391872 /system
parent2fae66e54bac9104acb2236aeffec80d1c794c4d (diff)
Name can be omiitted from ->dbforge->modify_column()'s 2nd param if you aren't changing the name.
Diffstat (limited to 'system')
-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)