<?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('contact_leads', function (Blueprint $table) {
            $table->unsignedBigInteger('account_id')->nullable()->change();
            $table->unsignedBigInteger('deal_id')->nullable()->change();
            $table->string('pipeline_type')->nullable()->change();
            $table->unsignedBigInteger('stage_id')->nullable()->change();
        });
    }

    public function down(): void
    {
        Schema::table('contact_leads', function (Blueprint $table) {
            $table->unsignedBigInteger('account_id')->nullable(false)->change();
            $table->unsignedBigInteger('deal_id')->nullable(false)->change();
            $table->string('pipeline_type')->nullable(false)->change();
            $table->unsignedBigInteger('stage_id')->nullable(false)->change();
        });
    }
};
