<?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('soal', function (Blueprint $table) {
            $table->enum('jawaban_benar', [0, 1])->default(0)->change();
            $table->renameColumn('jawaban_benar', 'is_reverse');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('soal', function (Blueprint $table) {
            $table->renameColumn('is_reverse', 'jawaban_benar');
            $table->enum('jawaban_benar', ['a', 'b', 'c', 'd', 'e'])->change();
        });
    }
};
