Merge branch '2015.11-develop' into 2016.11
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 2 Feb 2017 08:12:17 +0000 (09:12 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 2 Feb 2017 08:12:17 +0000 (09:12 +0100)
1  2 
tine20/Setup/Backend/Abstract.php

@@@ -306,7 -306,8 +306,8 @@@ abstract class Setup_Backend_Abstract i
       */
      public function columnExists($_columnName, $_tableName)
      {
-         $columns = Tinebase_Db_Table::getTableDescriptionFromCache(SQL_TABLE_PREFIX . $_tableName, $this->_db); 
+         // read description from database
+         $columns = $this->_db->describeTable(SQL_TABLE_PREFIX . $_tableName);
          return (isset($columns[$_columnName]) || array_key_exists($_columnName, $columns));
      }
      
                              } elseif(isset($typeMapping['defaultScale'])) {
                                  $scale = ',' . $typeMapping['defaultScale'];
                              }
 -                             
 -                            $options = "({$_field->length}{$scale})";
 +
 +                            if (!isset($typeMapping['lengthLessTypes']) || ! in_array($type, $typeMapping['lengthLessTypes'])) {
 +                                $options = "({$_field->length}{$scale})";
 +                            } else {
 +                                $options = '';
 +                            }
                              break;
                          }
                      }