<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $getCustomField = DB::table('custom_fields')
        ->where('id', 6)
        ->whereNotNull('options') 
        ->first();
    
        if ($getCustomField) {
            DB::table('custom_fields') 
                ->where('id', 6)
                ->update(['options' => null]); 
        }
    
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
};
