<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('p4_tim_penguji', function (Blueprint $table) {
            $table->id();
            $table->string('nim_mahasiswa');
            $table->string('nama_mahasiswa');
            $table->text('judul_skripsi');
            $table->string('nip_penguji1')->nullable();
            $table->string('nama_penguji1')->nullable();
            $table->string('nip_penguji2')->nullable();
            $table->string('nama_penguji2')->nullable();
            $table->string('nip_penguji3')->nullable();
            $table->string('nama_penguji3')->nullable();
            $table->string('nip_penguji4')->nullable();
            $table->string('nama_penguji4')->nullable();
            $table->string('nip_penguji5')->nullable();
            $table->string('nama_penguji5')->nullable();
            $table->timestamps();

            $table->foreign('nim_mahasiswa')->references('nim')->on('mahasiswa')->onDelete('cascade');
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('p4_tim_penguji');
    }
};
