Set type first so that it can be used when detecting defaults
authorChuck Hagenbuch <chuck@horde.org>
Sun, 13 Dec 2009 16:56:42 +0000 (11:56 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 13 Dec 2009 16:56:42 +0000 (11:56 -0500)
framework/Db/lib/Horde/Db/Adapter/Abstract/Column.php

index 38bf97e..a3e13b0 100644 (file)
@@ -52,14 +52,15 @@ class Horde_Db_Adapter_Abstract_Column
         $this->_name      = $name;
         $this->_sqlType   = $sqlType;
         $this->_null      = $null;
+
+        $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->_type      = $this->_simplifiedType($sqlType);
         $this->_default   = $this->extractDefault($default);
-
-        $this->_isText    = $this->_type == 'text'  || $this->_type == 'string';
-        $this->_isNumber  = $this->_type == 'float' || $this->_type == 'integer' || $this->_type == 'decimal';
     }
 
     /**