Commit c65c269e authored by Albert Casademont's avatar Albert Casademont Committed by Alexander

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.
parent 86b10e7e
...@@ -100,7 +100,7 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -100,7 +100,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
$decimal = strtok('(), ') ? strtok('(), '):null; $decimal = strtok('(), ') ? strtok('(), '):null;
} }
$type = array(); $type = array();
$unsigned = $fixed = null; $fixed = null;
if ( ! isset($tableColumn['name'])) { if ( ! isset($tableColumn['name'])) {
$tableColumn['name'] = ''; $tableColumn['name'] = '';
...@@ -147,7 +147,7 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -147,7 +147,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
$options = array( $options = array(
'length' => $length, 'length' => $length,
'unsigned' => (bool) $unsigned, 'unsigned' => (bool) (strpos($tableColumn['type'], 'unsigned') !== false),
'fixed' => (bool) $fixed, 'fixed' => (bool) $fixed,
'default' => isset($tableColumn['default']) ? $tableColumn['default'] : null, 'default' => isset($tableColumn['default']) ? $tableColumn['default'] : null,
'notnull' => (bool) ($tableColumn['null'] != 'YES'), 'notnull' => (bool) ($tableColumn['null'] != 'YES'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment