<?php

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

class AddMissingFieldsToControlHistory extends Migration
{
    public function up()
    {
        Schema::table('control_history', function (Blueprint $table) {
            $table->string('cie_code')->nullable();
            $table->text('diagnosis')->nullable();
            $table->boolean('active')->default(true);
        });
    }

    public function down()
    {
        Schema::table('control_history', function (Blueprint $table) {
            $table->dropColumn(['cie_code', 'diagnosis', 'active']);
        });
    }
} 