35 lines
832 B
PHP
35 lines
832 B
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('comments', function (Blueprint $table) {
|
|
$table->integer("type_id")->nullable()->comment("备注类型id")->after("user_id");
|
|
$table->string("type_name")->nullable()->comment("备注类型名")->after("type_id");
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('comments', function (Blueprint $table) {
|
|
$table->dropColumn('type_id');
|
|
$table->dropColumn('type_name');
|
|
});
|
|
}
|
|
};
|