Commit 3b01277f authored by Roman S. Borschel's avatar Roman S. Borschel

Merge commit 'upstream/master'

parents 668456e4 73ff99c0
......@@ -78,13 +78,6 @@ class DatabaseDriver implements Driver
$ids = array();
$fieldMappings = array();
foreach ($columns as $column) {
// Skip columns that are foreign keys
foreach ($foreignKeys as $foreignKey) {
if (in_array(strtolower($column->getName()), array_map('strtolower', $foreignKey->getColumns()))) {
continue(2);
}
}
$fieldMapping = array();
if (isset($indexes['primary']) && in_array($column->getName(), $indexes['primary']->getColumns())) {
$fieldMapping['id'] = true;
......@@ -100,7 +93,7 @@ class DatabaseDriver implements Driver
} else if ($column->getType() instanceof \Doctrine\DBAL\Types\IntegerType) {
$fieldMapping['unsigned'] = $column->getUnsigned();
}
$fieldMapping['notnull'] = $column->getNotNull();
$fieldMapping['nullable'] = $column->getNotNull() ? false : true;
if (isset($fieldMapping['id'])) {
$ids[] = $fieldMapping;
......
......@@ -136,7 +136,7 @@ EOT
$converter = new ConvertDoctrine1Schema($fromPaths);
$metadata = $converter->getMetadata();
if ($metadatas) {
if ($metadata) {
$output->write(PHP_EOL);
foreach ($metadata as $class) {
......
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