public static function fromVertabeloType($type) { $vertabeloTypeName = PropelType::getVertabeloTypeName($type); $typeMapping = (new TypeMapping())->getTypeMapping(); $propelTypeName = $typeMapping[$vertabeloTypeName]; $size = PropelType::getSize($type); $precision = PropelType::getPrecision($type); return new PropelType($propelTypeName, $size, $precision); }
protected function setColumnType($propelColumn, $columnType) { $typeParts = PropelType::fromVertabeloType($columnType); $propelColumn->addAttribute('type', $typeParts->name); if ($typeParts->size != NULL) { $propelColumn->addAttribute('size', $typeParts->size); } if ($typeParts->precision != NULL) { $propelColumn->addAttribute('scale', $typeParts->precision); } $propelColumn->addAttribute('sqlType', $columnType); }