<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('advertisements', function (Blueprint $table) {
            $table->unsignedBigInteger('large_mobile_banner_id')->nullable()->change();
            $table->unsignedBigInteger('medium_rectangle_id')->nullable()->change();
            $table->unsignedBigInteger('large_leaderboard_id')->nullable()->change();
            $table->unsignedBigInteger('super_banner_id')->nullable()->change();
            $table->unsignedBigInteger('large_banner_id')->nullable()->change();
            $table->unsignedBigInteger('slider_banner_id')->nullable()->change();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('advertisements', function (Blueprint $table) {
            $table->unsignedBigInteger('large_mobile_banner_id')->nullable(false)->change();
            $table->unsignedBigInteger('medium_rectangle_id')->nullable(false)->change();
            $table->unsignedBigInteger('large_leaderboard_id')->nullable(false)->change();
            $table->unsignedBigInteger('super_banner_id')->nullable(false)->change();
            $table->unsignedBigInteger('large_banner_id')->nullable(false)->change();
            $table->unsignedBigInteger('slider_banner_id')->nullable(false)->change();
        });
    }
};
