2021_12_29_074410_create_verse_table.php 1015 Bytes
<?php

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

class CreateVerseTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('verse', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedBigInteger('poetry_id')->index()->comment('诗词id');
            $table->string('stanza')->default('')->comment('诗节');
            $table->text('annotate')->comment('注解');
            $table->string('spelling')->default('')->comment('拼音');
            $table->text('en')->comment('英文解释');
            $table->unsignedTinyInteger('state')->index()->default(0)->comment('状态');
            $table->timestamps();
        });
    }

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