<?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('peptide_history', function (Blueprint $table) {
            $table->id();
            $table->foreignId('user_id')->constrained()->onDelete('cascade');
            $table->decimal('peptide_amount', 8, 2);
            $table->decimal('volume_fluid', 8, 2);
            $table->decimal('target_dose', 8, 2);
            $table->integer('syringe_yields');
            $table->decimal('injection_vol', 8, 2);
            $table->decimal('concentration', 8, 2);
            $table->decimal('yield_per_01ml', 8, 2);
            $table->integer('total_doses');
            $table->timestamp('created_on')->useCurrent();
        });
    }

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