<?php

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

class AddDoseToVcVaccinations extends Migration
{
    public function up()
    {
        if (!Schema::hasColumn('vc_vaccinations', 'dose')) {
            Schema::table('vc_vaccinations', function (Blueprint $table) {
                $table->string('dose', 100)->nullable()->after('vaccine_type_id');
            });
        }
    }

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