summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-11-03 21:45:28 +0100
committerAndrey Andreev <narf@devilix.net>2014-11-03 21:45:28 +0100
commit5289f27c07bfb1d961317de351c4819f25dd5f2e (patch)
treeda7f7e1a9df24b917e5447d443da5cd9cef1443a /system/database/drivers/mysqli/mysqli_forge.php
parent288e95dbdcd1c4e4144861919090075b4661f330 (diff)
Polish changes following #3305
Also add support for field comments in PostgreSQL & Oracle ... only via alter_table() for now :/
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_forge.php')
-rw-r--r--system/database/drivers/mysqli/mysqli_forge.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index 38f624909..24dc2b2ad 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.php
@@ -90,7 +90,7 @@ class CI_DB_mysqli_forge extends CI_DB_forge {
*
* @var string
*/
- protected $_null = 'NULL';
+ protected $_null = 'NULL';
// --------------------------------------------------------------------
@@ -187,8 +187,6 @@ class CI_DB_mysqli_forge extends CI_DB_forge {
$extra_clause = ' FIRST';
}
- $comment_clause = isset($field['comment']) ? ' COMMENT ' . $field['comment'] : '';
-
return $this->db->escape_identifiers($field['name'])
.(empty($field['new_name']) ? '' : ' '.$this->db->escape_identifiers($field['new_name']))
.' '.$field['type'].$field['length']
@@ -197,7 +195,7 @@ class CI_DB_mysqli_forge extends CI_DB_forge {
.$field['default']
.$field['auto_increment']
.$field['unique']
- .$comment_clause
+ .(empty($field['comment']) ? '' : ' COMMENT '.$field['comment'])
.$extra_clause;
}