<?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('vendors', function (Blueprint $table) {
            // Change the columns to JSON type
            $table->json('print_services')->nullable()->change();
            $table->json('materials_sold')->nullable()->change();
        });
    }

    public function down(): void
    {
        Schema::table('vendors', function (Blueprint $table) {
            // Revert back to text if you need to rollback
            $table->text('print_services')->nullable()->change();
            $table->text('materials_sold')->nullable()->change();
        });
    }
};
