<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    public function up()
    {
        Schema::table('admin_operation_logs', function (Blueprint $table) {
            $table->dropColumn('action');
            $table->dropColumn('target');
            $table->dropColumn('target_id');
        });
    }

    public function down()
    {
        Schema::table('admin_operation_logs', function (Blueprint $table) {
            $table->string('action')->nullable()->comment('操作');
            $table->string('target')->nullable()->comment('类型');
            $table->unsignedBigInteger('target_id')->nullable()->comment('类型ID');
        });
    }
};