<?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('regular_activities', function (Blueprint $table) {
            $table->timestamp("end_time")->nullable()->comment("结束时间")->after("date");
            $table->timestamp("start_time")->nullable()->comment("开始时间")->after("date");
            $table->enum('status', ["active", "ongoing", "done"])->default("active")->comment("状态")->after('title');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('regular_activities', function (Blueprint $table) {
            $table->dropColumn(['end_time', "start_time", 'status']);
        });
    }
};
