<?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
    {
        Schema::table('safety_and_privacy', function (Blueprint $table) {
            $table->boolean('is_finished')->nullable();
            $table->integer('status')->nullable();
            $table->string('status_fa')->nullable();
            $table->string('operator_description')->nullable();
            $table->string('supervisor_description')->nullable();
            $table->string('final_description')->nullable();
            $table->boolean('need_judiciary')->nullable();
            $table->integer('supervisor_id')->nullable();
            $table->string('supervisor_name')->nullable();
            $table->text('judiciary_document')->nullable()->change();
            $table->dateTime('judiciary_document_upload_date')->nullable()->change();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('safety_and_privacy', function (Blueprint $table) {
            $table->dropColumn([
                'status', 'final_description', 'is_finished',
                'supervisor_description', 'status_fa', 'need_judiciary',
                'operator_description', 'supervisor_name', 'supervisor_id',
            ]);
            $table->text('judiciary_document')->change();
            $table->dateTime('judiciary_document_upload_date')->change();
        });
    }
};
