goodsnotices/database/migrations/2024_05_25_120049_modify_table_notice.php

29 lines
638 B
PHP
Raw Normal View History

2024-05-25 14:06:58 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('notices', function (Blueprint $table) {
$table->integer('notice_type')->comment('通知type')->after('notice_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('notices', function (Blueprint $table) {
$table->dropColumn('notice_type');
});
}
};