<?php

declare(strict_types=1);

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        DB::table('settings')->updateOrInsert(['key' => 'tax_enabled'], ['value' => '1']);
        DB::table('settings')->updateOrInsert(['key' => 'service_charge_enabled'], ['value' => '1']);
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        DB::table('settings')->whereIn('key', ['tax_enabled', 'service_charge_enabled'])->delete();
    }
};
