Skip to content

Commit

Permalink
no case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
songzijian committed Feb 28, 2017
1 parent 7d793d7 commit 8f088dc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Parser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ protected function standardColumnDefinion($def, $table, $column)
!empty($defInfo['autoinc']) && $stdColDefStr .= $defInfo['autoinc'] . ' ';
!empty($defInfo['comment']) && $stdColDefStr .= $defInfo['comment'] . ' ';

$cache[$uniqKey] = $stdColDefStr;
$cache[$uniqKey] = trim($stdColDefStr);
}
return $cache[$uniqKey];
}
Expand Down Expand Up @@ -289,9 +289,6 @@ protected function parseColumnDefinition($def, $table, $column)

// 默认行为修正
if (empty($definition['nullable']) && empty($definition['default'])) {
if (empty($cache[$table][$column])) {
$this->msg->warning("\nan irregular definition was detected in `$table`.$column: empty nullable & default.");
}
$definition['default'] = 'DEFAULT NULL';
}

Expand Down Expand Up @@ -491,7 +488,7 @@ protected function getColDefListByTableDef($createSql)

protected function stripSpaces($str)
{
return preg_replace("/\s*[\r?\n|\t]+\s*/", ' ', $str);
return strtoupper(preg_replace("/\s*[\r?\n|\t]+\s*/", ' ', $str));
}

public function getMsgs()
Expand Down

0 comments on commit 8f088dc

Please sign in to comment.