<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        // Add password_otp_enabled setting (default: enabled to maintain current behavior)
        DB::table('settings')->insert([
            'key' => 'password_otp_enabled',
            'value' => '1', // Enabled by default
            'created_at' => now(),
            'updated_at' => now(),
        ]);
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        DB::table('settings')->where('key', 'password_otp_enabled')->delete();
    }
};
