<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('tenants', function (Blueprint $table): void {
            $table->string('address')->nullable()->after('site_title');
            $table->string('phone')->nullable()->after('address');
        });

        DB::table('tenants')->update([
            'address' => 'Av. San Lorenzo 1542, Rosario',
            'phone' => '54 9 (0341) 6658247',
        ]);
    }

    public function down(): void
    {
        Schema::table('tenants', function (Blueprint $table): void {
            $table->dropColumn(['address', 'phone']);
        });
    }
};
