<?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()
{
    Schema::create('extracuricullar_sub_kriterias', function (Blueprint $table) {
        $table->id();
        $table->unsignedBigInteger('extracuricullar_id');
        $table->unsignedBigInteger('criteria_id');
        $table->unsignedBigInteger('sub_criteria_id');
        $table->timestamps();

        $table->foreign('extracuricullar_id')->references('id')->on('extracuricullars');
        $table->foreign('criteria_id')->references('id')->on('criterias');
        $table->foreign('sub_criteria_id')->references('id')->on('sub_criterias');
    });
}


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