<?php

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

class CreateCardUserProjectTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('card_user_project', function (Blueprint $table) {
            $table->increments('id');
            $table->string('user_id')->comment('用户');
            $table->string('name')->default('')->comment('项目名');
            $table->string('show')->default('')->comment('展示图');
            $table->text('detail')->comment('详情');
            $table->timestamps();

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

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