1
0
mirror of synced 2025-01-18 14:31:40 +03:00

Fixed bug with default for boolean values not working properly.

This commit is contained in:
Jonathan.Wage 2007-10-25 22:26:25 +00:00
parent 3e31860edd
commit 4428b51746

View File

@ -137,10 +137,6 @@ class Doctrine_Import_Schema
$array = $schema['schema']; $array = $schema['schema'];
foreach ($array as $name => $properties) { foreach ($array as $name => $properties) {
if (!isset($properties['className'])) {
print_r($properties);
exit;
}
if ( ! empty($models) && !in_array($properties['className'], $models)) { if ( ! empty($models) && !in_array($properties['className'], $models)) {
continue; continue;
} }
@ -311,7 +307,7 @@ class Doctrine_Import_Schema
$colDesc['fixed'] = isset($field['fixed']) ? (int) $field['fixed']:null; $colDesc['fixed'] = isset($field['fixed']) ? (int) $field['fixed']:null;
$colDesc['unsigned'] = isset($field['unsigned']) ? (bool) $field['unsigned']:null; $colDesc['unsigned'] = isset($field['unsigned']) ? (bool) $field['unsigned']:null;
$colDesc['primary'] = isset($field['primary']) ? (bool) (isset($field['primary']) && $field['primary']):null; $colDesc['primary'] = isset($field['primary']) ? (bool) (isset($field['primary']) && $field['primary']):null;
$colDesc['default'] = isset($field['default']) ? (string) $field['default']:null; $colDesc['default'] = isset($field['default']) ? $field['default']:null;
$colDesc['notnull'] = isset($field['notnull']) ? (bool) (isset($field['notnull']) && $field['notnull']):null; $colDesc['notnull'] = isset($field['notnull']) ? (bool) (isset($field['notnull']) && $field['notnull']):null;
$colDesc['autoincrement'] = isset($field['autoincrement']) ? (bool) (isset($field['autoincrement']) && $field['autoincrement']):null; $colDesc['autoincrement'] = isset($field['autoincrement']) ? (bool) (isset($field['autoincrement']) && $field['autoincrement']):null;
$colDesc['autoincrement'] = isset($field['autoinc']) ? (bool) (isset($field['autoinc']) && $field['autoinc']):$colDesc['autoincrement']; $colDesc['autoincrement'] = isset($field['autoinc']) ? (bool) (isset($field['autoinc']) && $field['autoinc']):$colDesc['autoincrement'];