From 70adcc2b0e6782bdcc73e8933012c205c90ccd2e Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Fri, 6 Nov 2026 09:46:01 +0100 Subject: [PATCH] feat(databases): use newer default images for standalone databases Co-Authored-By: Claude Opus 5.5 --- app/Livewire/Project/New/Select.php | 2 +- bootstrap/helpers/databases.php | 2 +- ...ate_standalone_database_default_images.php | 42 +++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 database/migrations/2026_11_06_083240_update_standalone_database_default_images.php diff --git a/app/Livewire/Project/New/Select.php b/app/Livewire/Project/New/Select.php index 342cb1c942..d573e3f7a0 100644 --- a/app/Livewire/Project/New/Select.php +++ b/app/Livewire/Project/New/Select.php @@ -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; diff --git a/bootstrap/helpers/databases.php b/bootstrap/helpers/databases.php index 14b96f933d..237716e8fe 100644 --- a/bootstrap/helpers/databases.php +++ b/bootstrap/helpers/databases.php @@ -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(); diff --git a/database/migrations/2026_11_06_083240_update_standalone_database_default_images.php b/database/migrations/2026_11_06_083240_update_standalone_database_default_images.php new file mode 100644 index 0000000000..7c0f6e8ef5 --- /dev/null +++ b/database/migrations/2026_11_06_083240_update_standalone_database_default_images.php @@ -0,0 +1,42 @@ + + */ + 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(); + }); + } + } +};