Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Albert Casademont authored
4  lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
@@ -100,7 +100,7 @@ protected function _getPortableTableColumnDefinition($tableColumn)
100 100
             $decimal = strtok('(), ') ? strtok('(), '):null;
101 101
         }
102 102
         $type = array();
103  
-        $unsigned = $fixed = null;
  103
+        $fixed = null;
104 104
 
105 105
         if ( ! isset($tableColumn['name'])) {
106 106
             $tableColumn['name'] = '';
@@ -147,7 +147,7 @@ protected function _getPortableTableColumnDefinition($tableColumn)
147 147
 
148 148
         $options = array(
149 149
             'length'        => $length,
150  
-            'unsigned'      => (bool) $unsigned,
  150
+            'unsigned'      => (bool) (strpos($tableColumn['type'], 'unsigned') !== false),
151 151
             'fixed'         => (bool) $fixed,
152 152
             'default'       => isset($tableColumn['default']) ? $tableColumn['default'] : null,
153 153
             'notnull'       => (bool) ($tableColumn['null'] != 'YES'),

0 notes on commit e44a6c3

Please sign in to comment.
Something went wrong with that request. Please try again.