<?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('members', function (Blueprint $table) {
            $table->date('members_effective_date')->nullable()->after('endorsement_date')->index();
            $table->date('members_expire_date')->nullable()->after('members_effective_date')->index();
            $table->date('activation_date')->nullable()->after('members_expire_date')->index();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('members', function (Blueprint $table) {
            $table->dropColumn('members_effective_date');
            $table->dropColumn('members_expire_date');
            $table->dropColumn('activation_date');
        });
    }
};
