mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
feat(databases): use newer default images for standalone databases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3379fa448a
commit
70adcc2b0e
@@ -50,7 +50,7 @@ class Select extends Component
|
||||
|
||||
public ?string $selectedEnvironment = null;
|
||||
|
||||
public string $postgresql_type = 'postgres:16-alpine';
|
||||
public string $postgresql_type = 'postgres:18-alpine';
|
||||
|
||||
public ?string $existingPostgresqlUrl = null;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Support\Str;
|
||||
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
function create_standalone_postgresql($environmentId, StandaloneDocker|SwarmDocker $destination, ?array $otherData = null, string $databaseImage = 'postgres:16-alpine'): StandalonePostgresql
|
||||
function create_standalone_postgresql($environmentId, StandaloneDocker|SwarmDocker $destination, ?array $otherData = null, string $databaseImage = 'postgres:18-alpine'): StandalonePostgresql
|
||||
{
|
||||
$database = new StandalonePostgresql;
|
||||
$database->uuid = new_public_id();
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* New default image for each standalone database table, with the previous default.
|
||||
*
|
||||
* Existing databases keep their image. Only new databases use the new default.
|
||||
*
|
||||
* @var array<string, array{new: string, old: string}>
|
||||
*/
|
||||
private array $images = [
|
||||
'standalone_postgresqls' => ['new' => 'postgres:18-alpine', 'old' => 'postgres:16-alpine'],
|
||||
'standalone_redis' => ['new' => 'redis:8', 'old' => 'redis:7.2'],
|
||||
'standalone_mongodbs' => ['new' => 'mongo:9', 'old' => 'mongo:7'],
|
||||
'standalone_mysqls' => ['new' => 'mysql:9.7', 'old' => 'mysql:8'],
|
||||
'standalone_mariadbs' => ['new' => 'mariadb:12.3', 'old' => 'mariadb:11'],
|
||||
'standalone_clickhouses' => ['new' => 'clickhouse/clickhouse-server:26.8', 'old' => 'clickhouse/clickhouse-server:25.11'],
|
||||
];
|
||||
|
||||
public function up(): void
|
||||
{
|
||||
foreach ($this->images as $table => $image) {
|
||||
Schema::table($table, function (Blueprint $blueprint) use ($image) {
|
||||
$blueprint->string('image')->default($image['new'])->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
foreach ($this->images as $table => $image) {
|
||||
Schema::table($table, function (Blueprint $blueprint) use ($image) {
|
||||
$blueprint->string('image')->default($image['old'])->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user