From c1fc85dd4ced332a6a9ac6598981d5ca1cb5431a Mon Sep 17 00:00:00 2001 From: Marcin Kucharski Date: Wed, 12 Jun 2013 12:51:08 +0300 Subject: [PATCH] Fixed issue with migrations and decimal or numeric table size Fixes #695. The "NUMERIC" type is not mapped in the array, so if in line 288 always returned false. --- generator/lib/reverse/pgsql/PgsqlSchemaParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/lib/reverse/pgsql/PgsqlSchemaParser.php b/generator/lib/reverse/pgsql/PgsqlSchemaParser.php index c37b8fafb..091284edb 100644 --- a/generator/lib/reverse/pgsql/PgsqlSchemaParser.php +++ b/generator/lib/reverse/pgsql/PgsqlSchemaParser.php @@ -284,8 +284,8 @@ private function processLengthScale($intTypmod, $strName) return $arrRetVal; } // if ($intTypmod == -1) - // Numeric Datatype? - if ($strName == $this->getMappedNativeType(PropelTypes::NUMERIC)) { + // Decimal Datatype? + if ($strName == $this->getMappedNativeType(PropelTypes::DECIMAL)) { $intLen = ($intTypmod - 4) >> 16; $intPrec = ($intTypmod - 4) & 0xffff; $intLen = sprintf("%ld", $intLen);