Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix unsigned columns in MySql

Unsigned column properties were never set. In consequence all migrations diff were trying to change the column definition when it was already changed.
  • Loading branch information...
commit e44a6c36a8d9e0aa8d8abb2c91c443ced5a6e39e 1 parent 807e229
@acasademont acasademont authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
View
4 lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
@@ -100,7 +100,7 @@ protected function _getPortableTableColumnDefinition($tableColumn)
$decimal = strtok('(), ') ? strtok('(), '):null;
}
$type = array();
- $unsigned = $fixed = null;
+ $fixed = null;
if ( ! isset($tableColumn['name'])) {
$tableColumn['name'] = '';
@@ -147,7 +147,7 @@ protected function _getPortableTableColumnDefinition($tableColumn)
$options = array(
'length' => $length,
- 'unsigned' => (bool) $unsigned,
+ 'unsigned' => (bool) (strpos($tableColumn['type'], 'unsigned') !== false),
'fixed' => (bool) $fixed,
'default' => isset($tableColumn['default']) ? $tableColumn['default'] : null,
'notnull' => (bool) ($tableColumn['null'] != 'YES'),
Please sign in to comment.
Something went wrong with that request. Please try again.