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 CreateUserMessageLogsTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('user_message_logs', function (Blueprint $table) {
$table->id();
$table->integer('user_id');
$table->integer('message_id');
$table->integer('read_time');
$table->timestamps();
$table->index('user_id');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('user_message_logs');
}
}