<?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::table('guest_policy_settings', function (Blueprint $table) {
            $table->unsignedInteger('join_token_ttl_hours')
                ->default(168)
                ->after('join_token_download_decay_minutes');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('guest_policy_settings', function (Blueprint $table) {
            $table->dropColumn('join_token_ttl_hours');
        });
    }
};
