Fixed the structure of the reverse-engineered mapping
This commit is contained in:
parent
3d4113bd1b
commit
00eb0d3b67
@ -407,7 +407,7 @@ class DatabaseDriver implements MappingDriver
|
|||||||
case Type::STRING:
|
case Type::STRING:
|
||||||
case Type::TEXT:
|
case Type::TEXT:
|
||||||
$fieldMapping['length'] = $column->getLength();
|
$fieldMapping['length'] = $column->getLength();
|
||||||
$fieldMapping['fixed'] = $column->getFixed();
|
$fieldMapping['options']['fixed'] = $column->getFixed();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Type::DECIMAL:
|
case Type::DECIMAL:
|
||||||
@ -419,18 +419,18 @@ class DatabaseDriver implements MappingDriver
|
|||||||
case Type::INTEGER:
|
case Type::INTEGER:
|
||||||
case Type::BIGINT:
|
case Type::BIGINT:
|
||||||
case Type::SMALLINT:
|
case Type::SMALLINT:
|
||||||
$fieldMapping['unsigned'] = $column->getUnsigned();
|
$fieldMapping['options']['unsigned'] = $column->getUnsigned();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comment
|
// Comment
|
||||||
if (($comment = $column->getComment()) !== null) {
|
if (($comment = $column->getComment()) !== null) {
|
||||||
$fieldMapping['comment'] = $comment;
|
$fieldMapping['options']['comment'] = $comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default
|
// Default
|
||||||
if (($default = $column->getDefault()) !== null) {
|
if (($default = $column->getDefault()) !== null) {
|
||||||
$fieldMapping['default'] = $default;
|
$fieldMapping['options']['default'] = $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $fieldMapping;
|
return $fieldMapping;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user