<?php
 use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateDocHistory extends Migration { public function up() { Schema::create('doc_history', function (Blueprint $table) { $table->increments('id'); $table->timestamps(); $table->integer('docId')->nullable()->comment('文档ID'); $table->text('content')->nullable()->comment('内容'); $table->index(['docId']); }); } public function down() { } } 