Polish changes following #3305
Also add support for field comments in PostgreSQL & Oracle ... only via alter_table() for now :/
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index 38f6249..24dc2b2 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.php
@@ -90,7 +90,7 @@
*
* @var string
*/
- protected $_null = 'NULL';
+ protected $_null = 'NULL';
// --------------------------------------------------------------------
@@ -187,8 +187,6 @@
$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 @@
.$field['default']
.$field['auto_increment']
.$field['unique']
- .$comment_clause
+ .(empty($field['comment']) ? '' : ' COMMENT '.$field['comment'])
.$extra_clause;
}