bigIncrements('id'); $table->string('revisionable_type'); $table->unsignedBigInteger('revisionable_id'); $table->unsignedBigInteger('user_id')->nullable(); $table->string('key'); $table->text('old_value')->nullable(); $table->text('new_value')->nullable(); $table->timestamps(); $table->index(['revisionable_id', 'revisionable_type']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('revisions'); } }