<?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()
    {
        // 修改枚举列的值
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE ufutx_users MODIFY unit ENUM('kg', '斤', 'jin','lb') NOT NULL DEFAULT 'kg'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // 回滚修改，恢复原始的枚举值
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE ufutx_users MODIFY unit ENUM('kg', '斤','jin') NOT NULL DEFAULT 'kg'");
    }
};
