diff options
author | nisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in> | 2013-03-21 09:59:46 +0100 |
---|---|---|
committer | nisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in> | 2013-03-21 09:59:46 +0100 |
commit | 76f42d9dcd42bf90c407f151d04ef207c8deebdf (patch) | |
tree | c98568cd18540f2df23881ceed82cf9f1616d4c4 /system/database/DB_forge.php | |
parent | 7d10006a0001ff0e7d82ec994b1e9cbb63683ffc (diff) | |
parent | 13f6eabafa655828a8c09b4ae0a58a2e3776c269 (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/DB_forge.php')
-rw-r--r-- | system/database/DB_forge.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 53cdd53b6..d52029ecd 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -680,8 +680,12 @@ abstract class CI_DB_forge { return $sql.'DROP COLUMN '.$this->db->escape_identifiers($field); } + $sql .= ($alter_type === 'ADD') + ? 'ADD ' + : $alter_type.' COLUMN '; + $sqls = array(); - for ($i = 0, $c = count($field), $sql .= $alter_type.' COLUMN '; $i < $c; $i++) + for ($i = 0, $c = count($field); $i < $c; $i++) { $sqls[] = $sql .($field[$i]['_literal'] !== FALSE ? $field[$i]['_literal'] : $this->_process_column($field[$i])); |