diff options
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_forge.php | 28 |
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'])) |