Skip to content

Commit

Permalink
Ust constants in more comparisons.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 21, 2017
1 parent aa8eb6a commit 5cbf7a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Database/Schema/MysqlSchema.php
Expand Up @@ -328,13 +328,13 @@ public function columnSql(TableSchema $schema, $name)
}
if (isset($specialMap[$data['type']])) {
switch ($data['type']) {
case 'string':
case TableSchema::TYPE_STRING:
$out .= !empty($data['fixed']) ? ' CHAR' : ' VARCHAR';
if (!isset($data['length'])) {
$data['length'] = 255;
}
break;
case 'text':
case TableSchema::TYPE_TEXT:
$isKnownLength = in_array($data['length'], Table::$columnLengths);
if (empty($data['length']) || !$isKnownLength) {
$out .= ' TEXT';
Expand All @@ -347,7 +347,7 @@ public function columnSql(TableSchema $schema, $name)
}

break;
case 'binary':
case TableSchema::TYPE_BINARY:
$isKnownLength = in_array($data['length'], Table::$columnLengths);
if (empty($data['length']) || !$isKnownLength) {
$out .= ' BLOB';
Expand Down

0 comments on commit 5cbf7a7

Please sign in to comment.