Move MySQL comments to MySQL forge classes only
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index ee89e1d..282e2d1 100644
--- a/system/database/drivers/mysql/mysql_forge.php
+++ b/system/database/drivers/mysql/mysql_forge.php
@@ -185,6 +185,8 @@
$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 @@
.$field['default']
.$field['auto_increment']
.$field['unique']
- .$field['comment']
+ .$comment_clause
.$extra_clause;
}
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index e37bd1b..38f6249 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.php
@@ -187,6 +187,8 @@
$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']
@@ -195,7 +197,7 @@
.$field['default']
.$field['auto_increment']
.$field['unique']
- .$field['comment']
+ .$comment_clause
.$extra_clause;
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
index 2152dea..2e988c3 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 @@
$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 @@
.$field['default']
.$field['auto_increment']
.$field['unique']
- .$field['comment']
+ .$comment_clause
.$extra_clause;
}