2022_01_11_101251_create_everyday_poem_table.php 818 Bytes
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEverydayPoemTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('everyday_poem', function (Blueprint $table) {
            $table->increments('id');
            $table->date('date')->unique()->comment('日期');
            $table->string('should')->default('')->comment('宜');
            $table->unsignedBigInteger('poem_id')->index()->comment('一言');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('everyday_poem');
    }
}