1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Merge commit 'upstream/master'

This commit is contained in:
Roman S. Borschel 2010-05-14 22:11:47 +02:00
commit 3b01277fd4
2 changed files with 2 additions and 9 deletions

View File

@ -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;

View File

@ -136,7 +136,7 @@ EOT
$converter = new ConvertDoctrine1Schema($fromPaths);
$metadata = $converter->getMetadata();
if ($metadatas) {
if ($metadata) {
$output->write(PHP_EOL);
foreach ($metadata as $class) {