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 CreateHonorDisgracesTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('honor_disgraces', function (Blueprint $table) {
$table->id();
$table->string('name')->comment('决定人名称');
$table->string('organization')->comment('行政机关');
$table->text('content');
$table->integer('decision_time')->comment('决定时间 时间戳');
$table->integer('push_time')->comment('发布时间 时间戳');
$table->string('credit_code')->nullable()->comment('统一信用代码');
$table->string('document_number')->nullable()->comment('文书号');
$table->tinyInteger('type')->default(0)->comment('1 荣榜 2 辱榜');
$table->softDeletes();
$table->timestamps();
$table->index('push_time');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('honor_disgraces');
}
}