<?php

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

class AddWeightToVcAppointments extends Migration
{
    public function up()
    {
        if (!Schema::hasColumn('vc_appointments', 'weight_kg')) {
            Schema::table('vc_appointments', function (Blueprint $table) {
                $table->decimal('weight_kg', 8, 2)->nullable()->after('duration_minutes');
            });
        }
    }

    public function down()
    {
        if (Schema::hasColumn('vc_appointments', 'weight_kg')) {
            Schema::table('vc_appointments', function (Blueprint $table) {
                $table->dropColumn('weight_kg');
            });
        }
    }
}
