<?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('irons', function (Blueprint $table) {
            if (!Schema::hasColumn('irons','name')) $table->string('name')->nullable();
            if (!Schema::hasColumn('irons','price_per_m')) $table->decimal('price_per_m', 12, 2)->default(0);
        });
    }
    public function down(): void {}
};
