<?php

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

class CreateMessagesTagTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('messages_tag', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('site_id')->nullable()->comment('站点ID');
            $table->string('name',255)->comment('名称');
            $table->integer('sort')->comment('排序：越大越靠前');

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

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