<?php

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

return new class extends Migration {
    public function up(): void {
        Schema::table('institutions', function (Blueprint $table) {
            $table->unsignedInteger('stated_sar_backlog')->nullable()->after('is_prioritised');
            $table->timestamp('sar_backlog_updated_at')->nullable()->after('stated_sar_backlog');
        });
    }

    public function down(): void {
        Schema::table('institutions', function (Blueprint $table) {
            $table->dropColumn(['stated_sar_backlog', 'sar_backlog_updated_at']);
        });
    }
};
