<?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('aduans', function (Blueprint $table) {
            $table->string('nama_pelapor')->nullable()->after('isi_aduan');
            $table->string('nik')->nullable()->after('nama_pelapor');
            $table->string('desa')->nullable()->after('nik');
            $table->string('foto')->nullable()->after('desa');
            $table->float('confidence_score')->nullable()->after('prioritas');
            $table->text('tanggapan')->nullable()->after('confidence_score');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('aduans', function (Blueprint $table) {
            $table->dropColumn(['nama_pelapor', 'nik', 'desa', 'foto', 'confidence_score', 'tanggapan']);
        });
    }
};
