<?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('pakasir_settings', function (Blueprint $table) {
            $table->boolean('discord_mention_everyone')->default(false)->after('discord_message');
        });

        Schema::table('tripay_settings', function (Blueprint $table) {
            $table->boolean('discord_mention_everyone')->default(false)->after('discord_message');
        });

        Schema::table('ipaymu_settings', function (Blueprint $table) {
            $table->boolean('discord_mention_everyone')->default(false)->after('discord_message');
        });

        Schema::table('duitku_settings', function (Blueprint $table) {
            $table->boolean('discord_mention_everyone')->default(false)->after('discord_message');
        });
    }

    public function down(): void
    {
        Schema::table('pakasir_settings', function (Blueprint $table) {
            $table->dropColumn('discord_mention_everyone');
        });

        Schema::table('tripay_settings', function (Blueprint $table) {
            $table->dropColumn('discord_mention_everyone');
        });

        Schema::table('ipaymu_settings', function (Blueprint $table) {
            $table->dropColumn('discord_mention_everyone');
        });

        Schema::table('duitku_settings', function (Blueprint $table) {
            $table->dropColumn('discord_mention_everyone');
        });
    }
};
