<?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('azmayesh_field_azmayesh_type', function (Blueprint $table) {
            $table->id();
            $table->foreignId('azmayesh_field_id')->constrained('azmayesh_fields')->cascadeOnDelete();
            $table->foreignId('azmayesh_type_id')->constrained('azmayesh_types')->cascadeOnDelete();
            $table->timestamps();
        });
    }

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