summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mysql')
-rw-r--r--system/database/drivers/mysql/mysql_forge.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index 6f0d6c5e2..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,6 +195,7 @@ class CI_DB_mysql_forge extends CI_DB_forge {
.$field['default']
.$field['auto_increment']
.$field['unique']
+ .$comment_clause
.$extra_clause;
}