<?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('investment_settings', function (Blueprint $table): void {
            $table->boolean('referral_level_1_payout_enabled')
                ->default(true)
                ->after('referral_indirect_percent');
            $table->boolean('referral_level_2_payout_enabled')
                ->default(true)
                ->after('referral_level_1_payout_enabled');
        });
    }

    public function down(): void
    {
        Schema::table('investment_settings', function (Blueprint $table): void {
            $table->dropColumn([
                'referral_level_1_payout_enabled',
                'referral_level_2_payout_enabled',
            ]);
        });
    }
};
