<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        if (Schema::hasTable('coolify_action_logs')) {
            Schema::rename('coolify_action_logs', 'infrastructure_action_logs');
        }
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        if (Schema::hasTable('infrastructure_action_logs')) {
            Schema::rename('infrastructure_action_logs', 'coolify_action_logs');
        }
    }
};
