<?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('businesses', function (Blueprint $table): void {
            $table->text('whatsapp_api_endpoint')->nullable()->after('nextsms_sender_id');
            $table->text('whatsapp_api_token')->nullable()->after('whatsapp_api_endpoint');
        });
    }

    public function down(): void
    {
        Schema::table('businesses', function (Blueprint $table): void {
            $table->dropColumn(['whatsapp_api_endpoint', 'whatsapp_api_token']);
        });
    }
};
