<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration {
    public function up(): void
    {
        Schema::table('chapter_members', function (Blueprint $table) {
            $table->string('role')->nullable()->after('position')
                ->comment('Officer role: PRESIDENT, VICE_PRESIDENT, SECRETARY, TREASURER, AUDITOR, BOARD_MEMBER, MEMBER');
        });
    }

    public function down(): void
    {
        Schema::table('chapter_members', function (Blueprint $table) {
            $table->dropColumn('role');
        });
    }
};
