Exemple #1
0
 /** {@inheritdoc} */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     switch ($platform->getName()) {
         case 'mysql':
             return 'MEDIUMINT' . (isset($fieldDeclaration['unsigned']) && $fieldDeclaration['unsigned'] ? ' UNSIGNED' : '');
         default:
             return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration);
     }
 }
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration);
 }
Exemple #3
0
 /**
  * Gets the SQL declaration snippet for a field of this type.
  *
  * @param array $fieldDeclaration The field declaration.
  * @param AbstractPlatform $platform The currently used database platform.
  *
  * @return string
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     return $this->getValueType() === self::ENUM_INT ? $platform->getIntegerTypeDeclarationSQL($fieldDeclaration) : $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
Exemple #4
0
 public function getSqlDeclaration(array $fieldDeclaration, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
 {
     return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration);
 }