public static function toMigrationMethodName($type, $columnName)
    {
        $typeMap = self::getDoctrineTypeMap();

        if (!in_array($type, $typeMap)) {
            throw new SystemException(sprintf('Unknown column type: %s', $type));
        }

        // Some Doctrine types map to multiple migration types, for example
        // Doctrine boolean could be boolean and tinyInteger in migrations.
        // Some guessing could be required in this method. The method is not
        // 100% reliable.

        if ($type == DoctrineType::DATETIME) {
            // The datetime type maps to datetime and timestamp. Use the name 
            // guessing as the only possible solution.

            if (in_array($columnName, ['created_at', 'updated_at', 'deleted_at', 'published_at', 'deleted_at'])) {
                return self::TYPE_TIMESTAMP;
            }

            return self::TYPE_DATETIME;
        }

        $typeMap = array_flip($typeMap);
        return $typeMap[$type];
    }