Scale can influence the type, so it needs to be set first.
authorChuck Hagenbuch <chuck@horde.org>
Sun, 13 Dec 2009 19:32:16 +0000 (14:32 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 13 Dec 2009 19:32:16 +0000 (14:32 -0500)
framework/Db/lib/Horde/Db/Adapter/Base/Column.php

index 5d0ce69..433e308 100644 (file)
@@ -53,13 +53,14 @@ class Horde_Db_Adapter_Base_Column
         $this->_sqlType   = $sqlType;
         $this->_null      = $null;
 
+        $this->_limit     = $this->_extractLimit($sqlType);
+        $this->_precision = $this->_extractPrecision($sqlType);
+        $this->_scale     = $this->_extractScale($sqlType);
+
         $this->_type      = $this->_simplifiedType($sqlType);
         $this->_isText    = $this->_type == 'text'  || $this->_type == 'string';
         $this->_isNumber  = $this->_type == 'float' || $this->_type == 'integer' || $this->_type == 'decimal';
 
-        $this->_limit     = $this->_extractLimit($sqlType);
-        $this->_precision = $this->_extractPrecision($sqlType);
-        $this->_scale     = $this->_extractScale($sqlType);
         $this->_default   = $this->extractDefault($default);
     }