<?php

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

class CreateCardUserTrendTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('card_user_trend', function (Blueprint $table) {
            $table->increments('id');
            $table->string('user_id')->comment('用户');
            $table->string('show')->default('')->comment('列表展示图片');
            $table->text('pic')->comment('详情图片');
            $table->string('content')->default('')->comment('动态内容');
            $table->timestamps();

            $table->index('user_id');
        });
    }

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