35 lines
867 B
PHP
35 lines
867 B
PHP
|
<?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();
|
|||
|
$table->timestamps();
|
|||
|
$table->text('raw_content')->comment('原始消息内容');
|
|||
|
$table->string('err_message')->default('')->comment('处理时错误信息');
|
|||
|
$table->tinyInteger('state')->default(1)->comment('消息状态,1待消费,2消费进行中,3处理完成');
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* Reverse the migrations.
|
|||
|
*
|
|||
|
* @return void
|
|||
|
*/
|
|||
|
public function down()
|
|||
|
{
|
|||
|
Schema::dropIfExists('notices');
|
|||
|
}
|
|||
|
}
|