<?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::create('ms_form_kriteria', function (Blueprint $table) {
            $table->id('MsFormKriteriaId');
            $table->integer('page_number');
            $table->string('kategori')->nullable();
            $table->string('key')->nullable();
            $table->string('judul')->nullable();
            $table->string('type')->nullable();
            $table->json('option')->nullable();
            $table->integer('active_lainnya')->default(0);
            $table->string('judul_lainnya')->nullable();
            $table->integer('number_answer_lainnya')->nullable();
            $table->integer('active')->default(0);
            $table->year('tahun')->nullable();
            $table->text('keterangan')->nullable();
            $table->timestampsTz();
            $table->softDeletesTz();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('form_kriterias');
    }
};
