Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

1.1 KB
Raw Blame
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up()
    {
        // Change the default value for the 'image' column
        Schema::table('standalone_clickhouses', function (Blueprint $table) {
            $table->string('image')->default('bitnamilegacy/clickhouse')->change();
        });
        // Optionally, update any existing rows with the old default to the new one
        DB::table('standalone_clickhouses')
            ->where('image', 'bitnami/clickhouse')
            ->update(['image' => 'bitnamilegacy/clickhouse']);
    }

    public function down()
    {
        Schema::table('standalone_clickhouses', function (Blueprint $table) {
            $table->string('image')->default('bitnami/clickhouse')->change();
        });
        // Optionally, revert any changed values
        DB::table('standalone_clickhouses')
            ->where('image', 'bitnamilegacy/clickhouse')
            ->update(['image' => 'bitnami/clickhouse']);
    }
};