public static function rename($oldTypeName, $newTypeName)
    {
        $db = static::getDb();

        return $db->createCommand(
            'ALTER TYPE ' . $db->quoteColumnName($oldTypeName)
            . ' RENAME TO ' . $db->quoteColumnName($newTypeName)
        )->execute();
    }
public static function rename($oldTypeName, $newTypeName)
    {
        $db = static::getDb();

        return $db->createCommand(
            'ALTER TYPE ' . $db->quoteColumnName($oldTypeName)
            . ' RENAME TO ' . $db->quoteColumnName($newTypeName)
        )->execute();
    }
public static function rename ( $ oldTypeName , $ newTypeName ) { $ db = static :: getDb ( ) ; return $ db -> createCommand ( 'ALTER TYPE ' . $ db -> quoteColumnName ( $ oldTypeName ) . ' RENAME TO ' . $ db -> quoteColumnName ( $ newTypeName ) ) -> execute ( ) ; }
Rename an enum type

@param string $oldTypeName old name of the enum type
@param string $newTypeName new name of the enum type
@return int number of rows affected by the execution.
Rename an enum type