<?php
 use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateDocCategory extends Migration { public function up() { Schema::create('doc_category', function (Blueprint $table) { $table->increments('id'); $table->timestamps(); $table->integer('memberUserId')->nullable()->comment('用户ID'); $table->string('uid', 22)->nullable()->comment(''); $table->string('parentUid', 22)->nullable()->comment(''); $table->integer('sort')->nullable()->comment(''); $table->string('name', 50)->nullable()->comment('名称'); $table->string('color', 10)->nullable()->comment('名称'); $table->unique(['memberUserId', 'uid']); }); } public function down() { } } 