<?php

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

class CreateUserCareDreamTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_care_dream', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('当前用户ID');
            $table->integer('dream_id')->comment('关注梦想ID');
            $table->integer('dream_user_id')->comment('梦想用户ID');
            $table->integer('interaction_number')->default(0)->comment('最新动态数量');
            $table->timestamps();
        });
    }

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