<?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::create('server_rates', function (Blueprint $table) {
            $table->id();
            $table->integer('exp_rate')->default(1);
            $table->boolean('double_money')->default(false);
            $table->boolean('double_drop')->default(false);
            $table->boolean('double_sp')->default(false);
            $table->timestamps();
        });

        DB::table('server_rates')->insert([
            'exp_rate' => 1,
            'double_money' => false,
            'double_drop' => false,
            'double_sp' => false,
            'created_at' => now(),
            'updated_at' => now(),
        ]);
    }

    public function down(): void
    {
        Schema::dropIfExists('server_rates');
    }
};
