<?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()
    {
        if (!Schema::hasColumn('product_uploads', 'business_division'))
        {
            Schema::table('product_uploads', function (Blueprint $table)
            {
                $table->string('business_division')->nullable()->after('status');
            });
        }
        if (!Schema::hasColumn('product_uploads', 'manage_stock'))
        {
            Schema::table('product_uploads', function (Blueprint $table)
            {
                $table->string('manage_stock')->nullable()->after('status');
            });
        }
    }

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