up()
up()
Run the migrations.
<?php
/**
* JingYao-backend
*
* @link https://gitee.com/wang-zhihui-release/jingyao-backend
* @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMessagesTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('messages', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('content');
$table->integer('push_user_id');
$table->integer('push_time')->comment('发布时间戳');
$table->tinyInteger('type')->default(0)->comment('1 升级公告, 2 维护公告');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('messages');
}
}