<?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->tinyInteger("know")->default(0)->comment("是否知悉 0:否 1:是")->after("nutrient");
            $table->tinyInteger("understand")->default(0)->comment("是否理解 0:否 1:是")->after("know");
            $table->tinyInteger("really")->default(0)->comment("是否真实 0:否 1:是")->after("understand");
            $table->tinyInteger("duty")->default(0)->comment("是否愿意承担责任 0:否 1:是")->after("really");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user_infos', function (Blueprint $table) {
            $table->dropColumn('know');
            $table->dropColumn('understand');
            $table->dropColumn('really');
            $table->dropColumn('duty');
        });
    }
};
