<?php

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

class CreateMessagesFollowersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('messages_followers', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('messages_id')->comment('信息ID');
            $table->integer('user_id')->comment('用户ID');
            $table->string('username',255)->nullable()->comment('用户名');
            $table->string('mobile',11)->nullable()->comment('联系方式');

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

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