[2.0][DDC-5] Fixed.
This commit is contained in:
parent
92801ba8bd
commit
8c5887d05d
@ -169,10 +169,8 @@ class AnnotationDriver implements Driver
|
||||
|
||||
$mapping['type'] = $columnAnnot->type;
|
||||
$mapping['length'] = $columnAnnot->length;
|
||||
$mapping['fixed'] = $columnAnnot->fixed;
|
||||
$mapping['precision'] = $columnAnnot->precision;
|
||||
$mapping['scale'] = $columnAnnot->scale;
|
||||
$mapping['unsigned'] = $columnAnnot->unsigned;
|
||||
$mapping['nullable'] = $columnAnnot->nullable;
|
||||
$mapping['options'] = $columnAnnot->options;
|
||||
$mapping['unique'] = $columnAnnot->unique;
|
||||
|
@ -56,13 +56,11 @@ final class JoinColumns extends Annotation {}
|
||||
final class Column extends Annotation {
|
||||
public $type;
|
||||
public $length;
|
||||
public $fixed = false;
|
||||
public $precision = 0; // The precision for a decimal (exact numeric) column (Applies only for decimal column)
|
||||
public $scale = 0; // The scale for a decimal (exact numeric) column (Applies only for decimal column)
|
||||
public $unsigned = false;
|
||||
public $unique = false;
|
||||
public $nullable = false;
|
||||
public $default;
|
||||
public $default; //TODO: remove?
|
||||
public $name;
|
||||
public $options = array();
|
||||
}
|
||||
|
@ -125,10 +125,6 @@ class XmlDriver extends AbstractFileDriver
|
||||
$mapping['length'] = (int)$fieldMapping['length'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['fixed'])) {
|
||||
$mapping['fixed'] = (bool)$fieldMapping['fixed'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['precision'])) {
|
||||
$mapping['precision'] = (int)$fieldMapping['precision'];
|
||||
}
|
||||
@ -137,10 +133,6 @@ class XmlDriver extends AbstractFileDriver
|
||||
$mapping['scale'] = (int)$fieldMapping['scale'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['unsigned'])) {
|
||||
$mapping['unsigned'] = (bool)$fieldMapping['unsigned'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['unique'])) {
|
||||
$mapping['unique'] = (bool)$fieldMapping['unique'];
|
||||
}
|
||||
|
@ -128,10 +128,6 @@ class YamlDriver extends AbstractFileDriver
|
||||
$mapping['length'] = $fieldMapping['length'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['fixed'])) {
|
||||
$mapping['fixed'] = (bool)$fieldMapping['fixed'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['precision'])) {
|
||||
$mapping['precision'] = $fieldMapping['precision'];
|
||||
}
|
||||
@ -140,10 +136,6 @@ class YamlDriver extends AbstractFileDriver
|
||||
$mapping['scale'] = $fieldMapping['scale'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['unsigned'])) {
|
||||
$mapping['unsigned'] = (bool)$fieldMapping['unsigned'];
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['unique'])) {
|
||||
$mapping['unique'] = (bool)$fieldMapping['unique'];
|
||||
}
|
||||
|
@ -569,24 +569,12 @@ class SchemaTool
|
||||
$columnInfo['fixed'] = $fieldMapping['fixed'];
|
||||
$columnChanged = true;
|
||||
}
|
||||
|
||||
// 7. check for unsigned change
|
||||
$fieldMapping['unsigned'] = ( ! isset($fieldMapping['unsigned']))
|
||||
? false : $fieldMapping['unsigned'];
|
||||
|
||||
if ($columnInfo['unsigned'] != $fieldMapping['unsigned']) {
|
||||
$columnInfo['unsigned'] = $fieldMapping['unsigned'];
|
||||
$columnChanged = true;
|
||||
}
|
||||
|
||||
// Only add to column changed list if it was actually changed
|
||||
if ($columnChanged) {
|
||||
$updateFields[] = $columnInfo;
|
||||
}
|
||||
|
||||
//var_dump($columnInfo);
|
||||
echo PHP_EOL . PHP_EOL;
|
||||
|
||||
unset($currentColumns[$index]);
|
||||
$exists = true;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user