summaryrefslogtreecommitdiffstats
path: root/system/database/DB_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-03-17 10:50:45 +0100
committerAndrey Andreev <narf@devilix.net>2014-03-17 10:50:45 +0100
commit1394304472f1c917b8f6680c57bf50c780744f2d (patch)
tree07dcef76706d012f4cea1efa06c046707ed38c06 /system/database/DB_forge.php
parentdb3e49d2a932eca5910b0fc89c87d28c1d6b7bb1 (diff)
Fix DB forge unsigned attribute (PR #2949)
Diffstat (limited to 'system/database/DB_forge.php')
-rw-r--r--system/database/DB_forge.php28
1 files changed, 13 insertions, 15 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 38e4ccf2c..21ef40119 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -747,25 +747,23 @@ abstract class CI_DB_forge {
continue;
}
- if (isset($attributes['TYPE']))
- {
- $this->_attr_type($attributes);
- $this->_attr_unsigned($attributes, $field);
- }
+ isset($attributes['TYPE']) && $this->_attr_type($attributes);
$field = array(
- 'name' => $key,
- 'new_name' => isset($attributes['NAME']) ? $attributes['NAME'] : NULL,
- 'type' => isset($attributes['TYPE']) ? $attributes['TYPE'] : NULL,
- 'length' => '',
- 'unsigned' => '',
- 'null' => '',
- 'unique' => '',
- 'default' => '',
- 'auto_increment' => '',
- '_literal' => FALSE
+ 'name' => $key,
+ 'new_name' => isset($attributes['NAME']) ? $attributes['NAME'] : NULL,
+ 'type' => isset($attributes['TYPE']) ? $attributes['TYPE'] : NULL,
+ 'length' => '',
+ 'unsigned' => '',
+ 'null' => '',
+ 'unique' => '',
+ 'default' => '',
+ 'auto_increment' => '',
+ '_literal' => FALSE
);
+ isset($attributes['TYPE']) && $this->_attr_unsigned($attributes, $field);
+
if ($create_table === FALSE)
{
if (isset($attributes['AFTER']))