<?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::table('cutting_results', function (Blueprint $table) {
            $table->unsignedInteger('cutting_result')->nullable()->change();
            $table->unsignedInteger('sample')->nullable()->change();
            $table->unsignedInteger('original_outside_sample')->nullable()->default(null)->change();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('cutting_results', function (Blueprint $table) {
            $table->unsignedInteger('cutting_result')->nullable(false)->change();
            $table->unsignedInteger('sample')->nullable(false)->change();
            $table->unsignedInteger('original_outside_sample')->nullable(false)->default(0)->change();
        });
    }
};
