coollabsio/coolify · error · RuntimeException

Unsupported database type: {$type}

Error message

Unsupported database type: {$type}

What it means

Error "Unsupported database type: {$type}" thrown in coollabsio/coolify.

Source

Thrown at app/Services/ServerTransfer/ServerTransferImporter.php:833

     * @param  array<string, mixed>  $payload
     * @param  array<string, StandaloneDocker|SwarmDocker>  $destinationMap
     */
    private function importDatabase(
        array $payload,
        Environment $environment,
        array $destinationMap,
        bool $preserveUuids,
        bool $adoptMode,
        int $teamId = 0,
    ): ?Model {
        $type = (string) data_get($payload, 'type', 'StandalonePostgresql');
        $modelClass = self::DATABASE_MODELS[$type]
            ?? (is_string(data_get($payload, 'model')) && class_exists((string) data_get($payload, 'model'))
                ? (string) data_get($payload, 'model')
                : null);

        if (! $modelClass || ! class_exists($modelClass)) {
            throw new RuntimeException("Unsupported database type: {$type}");
        }

        $destination = $this->resolveDestination(data_get($payload, 'destination_uuid'), $destinationMap);
        $uuid = $preserveUuids && filled(data_get($payload, 'uuid'))
            ? (string) data_get($payload, 'uuid')
            : new_public_id();

        if ($modelClass::withTrashed()->where('uuid', $uuid)->exists()) {
            $uuid = new_public_id();
        }

        $attributes = (array) data_get($payload, 'attributes', []);
        unset($attributes['id'], $attributes['environment_id'], $attributes['destination_id'], $attributes['destination_type']);
        $attributes = $this->onlyExistingColumns($modelClass, $attributes);
        $attributes['uuid'] = $uuid;
        $attributes['environment_id'] = $environment->id;
        $attributes['destination_id'] = $destination->id;
        $attributes['destination_type'] = $destination->getMorphClass();

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Services/ServerTransfer/ServerTransferImporter.php:833 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/a9bf70a74fde542c. Report an issue: GitHub.