<?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()
    {
        Schema::table('supplier', function (Blueprint $table) {
            $table->string('main_category')->nullable()->comment('主营大类')->change();
            $table->string('main_product')->nullable()->comment('主要产品')->change();
            $table->char('mobile',11)->nullable()->comment('联系人手机号')->change();
            $table->string('product_ids')->nullable()->comment('产品id')->change();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('supplier', function (Blueprint $table) {
            $table->dropColumn('main_category');
            $table->dropColumn('main_product');
            $table->dropColumn('mobile');
            $table->dropColumn('product_ids');
        });
    }
};
