2022_03_14_175941_create_settings_table.php 934 Bytes
<?php

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

class CreateSettingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('settings', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment('标题');
            $table->string('keyword')->comment('关键字');
            $table->json('content')->comment('内容');
            $table->unsignedTinyInteger('version')->default(1)->comment('版本');
            $table->unsignedTinyInteger('terminal')->comment('1=安卓,2=IOS,3=全平台');

            $table->timestamps();
        });
    }

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