ufutx.dma/database/migrations/2024_01_08_180543_change_table_supplier.php
2026-03-04 14:42:40 +08:00

39 lines
1.1 KiB
PHP

<?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');
});
}
};