diff options
-rw-r--r-- | system/database/DB_forge.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 4eeb74a9c..bcf7a8d71 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -806,10 +806,13 @@ abstract class CI_DB_forge { case 'ENUM': case 'SET': $attributes['CONSTRAINT'] = $this->db->escape($attributes['CONSTRAINT']); + $field['length'] = is_array($attributes['CONSTRAINT']) + ? "('".implode("','", $attributes['CONSTRAINT'])."')" + : '('.$attributes['CONSTRAINT'].')'; default: $field['length'] = is_array($attributes['CONSTRAINT']) - ? "('".implode("','", $attributes['CONSTRAINT'])."')" - : '('.$attributes['CONSTRAINT'].')'; + ? '('.implode(',', $attributes['CONSTRAINT']).')' + : '('.$attributes['CONSTRAINT'].')'; break; } } |