From 8c5887d05d38bdc40d1af8f3c8a76abee1d2faa9 Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 19 Sep 2009 12:17:01 +0000 Subject: [PATCH] [2.0][DDC-5] Fixed. --- lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php | 2 -- .../ORM/Mapping/Driver/DoctrineAnnotations.php | 4 +--- lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 8 -------- lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php | 8 -------- lib/Doctrine/ORM/Tools/SchemaTool.php | 12 ------------ 5 files changed, 1 insertion(+), 33 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 14e2824c7..642619120 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -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; diff --git a/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php b/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php index 692ce5636..cd287f01b 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php @@ -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(); } diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index aef30d2a0..acff179bf 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -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']; } diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index 53fe54ea9..8248ee370 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -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']; } diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index ac917031f..4db3337d1 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -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;