increments('id'); $table->string('term', 200); $table->string('entity_type', 100); $table->integer('entity_id'); $table->integer('score'); $table->index('term'); $table->index('entity_type'); $table->index(['entity_type', 'entity_id']); $table->index('score'); }); // TODO - Drop old fulltext indexes app(\BookStack\Services\SearchService::class)->indexAllEntities(); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('search_terms'); } }