<?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('website_type', function (Blueprint $table): void {
            $table->string('scanner_domain')->nullable()->unique()->after('dominio');
        });
    }

    public function down(): void
    {
        Schema::table('website_type', function (Blueprint $table): void {
            $table->dropUnique(['scanner_domain']);
            $table->dropColumn('scanner_domain');
        });
    }
};
