<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('rcic_registries', function (Blueprint $table) {
            $table->id();
            $table->string('college_id')->nullable()->unique(); // Column 1: R710673
            $table->string('name'); // Column 2: Full Name
            $table->string('company_name')->nullable(); // Column 3: Company Name
            $table->string('type')->nullable(); // Column 4: RCIC Type (RCIC - L1, RCIC - L2, RCIC-IRB - L3)
            $table->string('employment_company')->nullable(); // Column 5: Employment Company
            $table->string('email')->nullable(); // Column 6: Email
            $table->timestamps();
            
            // Indexes for better performance
            $table->index('college_id');
            $table->index('name');
            $table->index('email');
            $table->index('type');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('rcic_registries');
    }
};
