summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo
diff options
context:
space:
mode:
authorZachary Flower <zach@ninjaninja.net>2014-11-03 18:42:57 +0100
committerZachary Flower <zach@ninjaninja.net>2014-11-03 18:42:57 +0100
commite4b10bf0ad59049ed78ed9cfc5f708188f3cd442 (patch)
tree1473fb43fa28839a47e02ba36574633fe68d2fbb /system/database/drivers/pdo
parent12ee7a1a74e45b1369876ea945ae3347da046087 (diff)
Move MySQL comments to MySQL forge classes only
Diffstat (limited to 'system/database/drivers/pdo')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
index 2152dea30..2e988c3f5 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
@@ -199,6 +199,8 @@ class CI_DB_pdo_mysql_forge extends CI_DB_pdo_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']
@@ -207,7 +209,7 @@ class CI_DB_pdo_mysql_forge extends CI_DB_pdo_forge {
.$field['default']
.$field['auto_increment']
.$field['unique']
- .$field['comment']
+ .$comment_clause
.$extra_clause;
}