57 lines
2.2 KiB
PHP
57 lines
2.2 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('s2_real_object', function (Blueprint $table) {
|
|
$table->timestamps(); // 这将会添加 created_at 和 updated_at 两个时间字段
|
|
});
|
|
Schema::table('s2_shop_category', function (Blueprint $table) {
|
|
$table->timestamps(); // 这将会添加 created_at 和 updated_at 两个时间字段
|
|
});
|
|
Schema::table('s2_tmp_shop_sku', function (Blueprint $table) {
|
|
$table->timestamps(); // 这将会添加 created_at 和 updated_at 两个时间字段
|
|
});
|
|
Schema::table('s2_tpl_freight', function (Blueprint $table) {
|
|
$table->timestamps(); // 这将会添加 created_at 和 updated_at 两个时间字段
|
|
});
|
|
Schema::table('s2_tpl_price', function (Blueprint $table) {
|
|
$table->timestamps(); // 这将会添加 created_at 和 updated_at 两个时间字段
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('s2_real_object', function (Blueprint $table) {
|
|
$table->dropTimestamps(); // 如果需要撤销操作,可以使用 dropTimestamps 方法
|
|
});
|
|
Schema::table('s2_shop_category', function (Blueprint $table) {
|
|
$table->dropTimestamps(); // 如果需要撤销操作,可以使用 dropTimestamps 方法
|
|
});
|
|
Schema::table('s2_tmp_shop_sku', function (Blueprint $table) {
|
|
$table->dropTimestamps(); // 如果需要撤销操作,可以使用 dropTimestamps 方法
|
|
});
|
|
Schema::table('s2_tpl_freight', function (Blueprint $table) {
|
|
$table->dropTimestamps(); // 如果需要撤销操作,可以使用 dropTimestamps 方法
|
|
});
|
|
Schema::table('s2_tpl_price', function (Blueprint $table) {
|
|
$table->dropTimestamps(); // 如果需要撤销操作,可以使用 dropTimestamps 方法
|
|
});
|
|
}
|
|
};
|