Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Sep 27, 2017
1 parent aba345d commit e9e3fe1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,18 @@ protected function _getPortableTableColumnDefinition($tableColumn)
break;
}

$length = $length !== null ? (int) $length : null;

$isNotNull = $tableColumn['null'] !== 'YES';

if ($this->_platform instanceof MariaDb102Platform) {
$columnDefault = $this->getMariaDb1027ColumnDefault($this->_platform, $tableColumn['default'] ?? null);
} else {
$columnDefault = (isset($tableColumn['default'])) ? $tableColumn['default'] : null;
}

$options = [
'length' => $length,
'length' => $length !== null ? (int) $length : null,
'unsigned' => strpos($tableColumn['type'], 'unsigned') !== false,
'fixed' => (bool) $fixed,
'default' => $columnDefault,
'notnull' => $isNotNull,
'notnull' => $tableColumn['null'] !== 'YES',
'scale' => null,
'precision' => null,
'autoincrement' => strpos($tableColumn['extra'], 'auto_increment') !== false,
Expand Down

0 comments on commit e9e3fe1

Please sign in to comment.