<?php

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

class AddInputConfigToBankSoalSikk extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('bank_soal_sikk', function (Blueprint $table) {
            $table->enum('tipe_input', ['text', 'textarea', 'radio', 'select'])->default('text')->after('status');
            $table->json('pilihan_jawaban')->nullable()->after('tipe_input')->comment('JSON array untuk radio/select options');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('bank_soal_sikk', function (Blueprint $table) {
            $table->dropColumn(['tipe_input', 'pilihan_jawaban']);
        });
    }
}
