Commit d3847864 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-157' into 2.1.x

parents 41d28002 2ef8f632
...@@ -61,7 +61,7 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -61,7 +61,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
} }
$tableIndexes[$k] = $v; $tableIndexes[$k] = $v;
} }
return parent::_getPortableTableIndexesList($tableIndexes, $tableName); return parent::_getPortableTableIndexesList($tableIndexes, $tableName);
} }
...@@ -74,12 +74,12 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -74,12 +74,12 @@ class MySqlSchemaManager extends AbstractSchemaManager
{ {
return $database['Database']; return $database['Database'];
} }
/** /**
* Gets a portable column definition. * Gets a portable column definition.
* *
* The database type is mapped to a corresponding Doctrine mapping type. * The database type is mapped to a corresponding Doctrine mapping type.
* *
* @param $tableColumn * @param $tableColumn
* @return array * @return array
*/ */
...@@ -102,10 +102,10 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -102,10 +102,10 @@ class MySqlSchemaManager extends AbstractSchemaManager
if ( ! isset($tableColumn['name'])) { if ( ! isset($tableColumn['name'])) {
$tableColumn['name'] = ''; $tableColumn['name'] = '';
} }
$scale = null; $scale = null;
$precision = null; $precision = null;
$type = $this->_platform->getDoctrineTypeMapping($dbType); $type = $this->_platform->getDoctrineTypeMapping($dbType);
$type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type); $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type);
$tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type); $tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type);
...@@ -154,7 +154,7 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -154,7 +154,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
'length' => $length, 'length' => $length,
'unsigned' => (bool)$unsigned, 'unsigned' => (bool)$unsigned,
'fixed' => (bool)$fixed, 'fixed' => (bool)$fixed,
'default' => $tableColumn['default'], 'default' => isset($tableColumn['default']) ? $tableColumn['default'] : null,
'notnull' => (bool) ($tableColumn['null'] != 'YES'), 'notnull' => (bool) ($tableColumn['null'] != 'YES'),
'scale' => null, 'scale' => null,
'precision' => null, 'precision' => null,
...@@ -180,7 +180,7 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -180,7 +180,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
if (!isset($tableForeignKey['update_rule']) || $tableForeignKey['update_rule'] == "RESTRICT") { if (!isset($tableForeignKey['update_rule']) || $tableForeignKey['update_rule'] == "RESTRICT") {
$tableForeignKey['update_rule'] = null; $tableForeignKey['update_rule'] = null;
} }
return new ForeignKeyConstraint( return new ForeignKeyConstraint(
(array)$tableForeignKey['column_name'], (array)$tableForeignKey['column_name'],
$tableForeignKey['referenced_table_name'], $tableForeignKey['referenced_table_name'],
......
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