<?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('s2_shop_sku', function (Blueprint $table) {
            $table->softDeletes(); // 增加软删除字段
        });
        Schema::table('s2_shop_category', function (Blueprint $table) {
            $table->softDeletes(); // 增加软删除字段
        });
        Schema::table('s2_shop_spu', function (Blueprint $table) {
            $table->softDeletes(); // 增加软删除字段
        });
        Schema::table('s2_real_object', function (Blueprint $table) {
            $table->softDeletes(); // 增加软删除字段
        });
        Schema::table('s2_tpl_freight', function (Blueprint $table) {
            $table->softDeletes(); // 增加软删除字段
        });
        Schema::table('s2_tpl_price', function (Blueprint $table) {
            $table->softDeletes(); // 增加软删除字段
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('s2_shop_sku', function (Blueprint $table) {
            $table->dropSoftDeletes(); // 在回滚迁移时移除软删除字段
        });
        Schema::table('s2_shop_category', function (Blueprint $table) {
            $table->dropSoftDeletes(); // 增加软删除字段
        });
        Schema::table('s2_shop_spu', function (Blueprint $table) {
            $table->dropSoftDeletes(); // 增加软删除字段
        });
        Schema::table('s2_real_object', function (Blueprint $table) {
            $table->dropSoftDeletes(); // 增加软删除字段
        });
        Schema::table('s2_tpl_freight', function (Blueprint $table) {
            $table->dropSoftDeletes(); // 增加软删除字段
        });
        Schema::table('s2_tpl_price', function (Blueprint $table) {
            $table->dropSoftDeletes(); // 增加软删除字段
        });
    }
};
