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