<?php

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

class CreateSupportDreamTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('support_dream', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('当前用户ID');
            $table->integer('dream_id')->comment('梦想ID');
            $table->integer('to_user_id')->comment('梦想所有者ID');
            $table->integer('coin')->comment('充值梦想币数量');
            $table->integer('score')->comment('支持分数');
            $table->timestamps();
        });
    }

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