<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_infos', function (Blueprint $table) {
            $table->text("surgery")->nullable()->comment("是否手术")->after("duty");
            $table->text("medication")->nullable()->comment("是否服用药物")->after("surgery");
            $table->text("allergies")->nullable()->comment("是否过敏")->after("medication");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user_infos', function (Blueprint $table) {
            $table->dropColumn("surgery");
            $table->dropColumn("medication");
            $table->dropColumn("allergies");
        });
    }
};
