<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('boats', function (Blueprint $table) {
            $table->string('boat_type')->nullable();
            $table->unsignedInteger('accommodation_capacity')->nullable();
            $table->unsignedInteger('cabin_count')->nullable();
            $table->unsignedInteger('cruise_capacity')->nullable();
            $table->unsignedInteger('toilet_count')->nullable();
            $table->decimal('length_meters', 6, 2)->nullable();
            $table->decimal('length_feet', 6, 2)->nullable();
            $table->unsignedSmallInteger('build_year')->nullable();
            $table->string('brand')->nullable();
            $table->string('model')->nullable();
        });
    }

    public function down(): void
    {
        Schema::table('boats', function (Blueprint $table) {
            $table->dropColumn([
                'boat_type',
                'accommodation_capacity',
                'cabin_count',
                'cruise_capacity',
                'toilet_count',
                'length_meters',
                'length_feet',
                'build_year',
                'brand',
                'model',
            ]);
        });
    }
};
