public static function create($typeName, $values)
    {
        $db = static::getDb();
        $quotedValues = array_map([$db, 'quoteValue'], $values);

        return static::getDb()->createCommand(
            'CREATE TYPE ' . $db->quoteColumnName($typeName)
            . ' AS ENUM (' . implode(',', $quotedValues) . ')'
        )->execute();
    }
public static function create($typeName, $values)
    {
        $db = static::getDb();
        $quotedValues = array_map([$db, 'quoteValue'], $values);

        return static::getDb()->createCommand(
            'CREATE TYPE ' . $db->quoteColumnName($typeName)
            . ' AS ENUM (' . implode(',', $quotedValues) . ')'
        )->execute();
    }
public static function create ( $ typeName , $ values ) { $ db = static :: getDb ( ) ; $ quotedValues = array_map ( [ $ db , 'quoteValue' ] , $ values ) ; return static :: getDb ( ) -> createCommand ( 'CREATE TYPE ' . $ db -> quoteColumnName ( $ typeName ) . ' AS ENUM (' . implode ( ',' , $ quotedValues ) . ')' ) -> execute ( ) ; }
Create an enum type

@param string $typeName name of the enum type
@param string[] $values values of the enum type
@return int number of rows affected by the execution.
Create an enum type