2024-05-24 07:55:55 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
|
|
class CreateNoticesTable extends Migration
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Run the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
|
|
|
|
Schema::create('notices', function (Blueprint $table) {
|
|
|
|
|
$table->id();
|
2024-05-26 14:06:21 +00:00
|
|
|
|
$table->integer('notice_id')->unique()->comment('通知id');
|
|
|
|
|
$table->integer('notice_type')->comment('通知type');
|
2024-05-24 07:55:55 +00:00
|
|
|
|
$table->text('raw_content')->comment('原始消息内容');
|
2024-05-26 14:49:03 +00:00
|
|
|
|
$table->text('err_message')->comment('处理时错误信息');
|
2024-05-24 07:55:55 +00:00
|
|
|
|
$table->tinyInteger('state')->default(1)->comment('消息状态,1待消费,2消费进行中,3处理完成');
|
2024-05-25 14:06:58 +00:00
|
|
|
|
$table->timestamps();
|
2024-05-24 07:55:55 +00:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('notices');
|
|
|
|
|
}
|
|
|
|
|
}
|