3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
6 class FulltextWeighting extends Migration
15 DB::statement('ALTER TABLE pages ADD FULLTEXT name_search(name)');
16 DB::statement('ALTER TABLE books ADD FULLTEXT name_search(name)');
17 DB::statement('ALTER TABLE chapters ADD FULLTEXT name_search(name)');
21 * Reverse the migrations.
25 public function down()
27 Schema::table('pages', function(Blueprint $table) {
28 $table->dropIndex('name_search');
30 Schema::table('books', function(Blueprint $table) {
31 $table->dropIndex('name_search');
33 Schema::table('chapters', function(Blueprint $table) {
34 $table->dropIndex('name_search');