<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cultivations', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('pond_id')->nullable(); 
            $table->foreign('pond_id')->references('id')->on('ponds'); 
            $table->integer('day');
            $table->double('weight');
            $table->double('feed_spent');
            $table->double('total_feed_spent');
            $table->double('total_fish_weight');
            $table->timestamps();
        });
    }

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