From 2ab2b1e3201a1eca2954ca463df744d5cd2e46cd Mon Sep 17 00:00:00 2001 From: Esen Sagynov Date: Thu, 11 Aug 2011 00:41:16 -0700 Subject: Added back /application/* files (removed in previous commit accidently). Corrected formatting/indenting in CUBRID Driver classes. Added myself as the driver author. Applied the MySQL fix, previously accepted in pull request #29, to CUBRID Driver. --- system/database/drivers/cubrid/cubrid_forge.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'system/database/drivers/cubrid/cubrid_forge.php') diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index 1de0db108..bab03f748 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -1,4 +1,4 @@ -db->_protect_identifiers($field) . "\""; + $sql .= "\n\t\"" . $this->db->_protect_identifiers($field) . "\""; if (array_key_exists('NAME', $attributes)) { @@ -90,7 +90,7 @@ class CI_DB_cubrid_forge extends CI_DB_forge { if (array_key_exists('TYPE', $attributes)) { - $sql .= ' '.$attributes['TYPE']; + $sql .= ' '.$attributes['TYPE']; if (array_key_exists('CONSTRAINT', $attributes)) { @@ -125,17 +125,21 @@ class CI_DB_cubrid_forge extends CI_DB_forge { $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; } - if (array_key_exists('NULL', $attributes)) + if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) { - $sql .= ($attributes['NULL'] === TRUE) ? '' : ' NOT NULL'; + $sql .= ' NULL'; + } + else + { + $sql .= ' NOT NULL'; } if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) { $sql .= ' AUTO_INCREMENT'; } - - if (array_key_exists('UNIQUE', $attributes) && $attributes['UNIQUE'] === TRUE) + + if (array_key_exists('UNIQUE', $attributes) && $attributes['UNIQUE'] === TRUE) { $sql .= ' UNIQUE'; } -- cgit v1.2.3-24-g4f1b