From e4b10bf0ad59049ed78ed9cfc5f708188f3cd442 Mon Sep 17 00:00:00 2001 From: Zachary Flower Date: Mon, 3 Nov 2014 10:42:57 -0700 Subject: Move MySQL comments to MySQL forge classes only --- system/database/drivers/mysql/mysql_forge.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system/database/drivers/mysql') diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index ee89e1d80..282e2d1d8 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -185,6 +185,8 @@ class CI_DB_mysql_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'] @@ -193,7 +195,7 @@ class CI_DB_mysql_forge extends CI_DB_forge { .$field['default'] .$field['auto_increment'] .$field['unique'] - .$field['comment'] + .$comment_clause .$extra_clause; } -- cgit v1.2.3-24-g4f1b