<?php

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

return new class extends Migration
{
    public function up()
{
    Schema::create('animal_breed', function (Blueprint $table) {
        $table->id('AB_Id');

        $table->unsignedBigInteger('AS_Id');
        $table->string('Breed_Name', 100);
        $table->string('Breed_Category', 50)->nullable();

        $table->timestamps();
        $table->softDeletes();

        // ✅ Foreign Key
        $table->foreign('AS_Id')
              ->references('AS_Id')
              ->on('animal_species')
              ->onDelete('cascade');
    });
}

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