Set table engine to MyISAM explicitly (for fulltext support)

This commit is contained in:
Franz Liedke 2015-06-07 22:04:45 +02:00
parent 2a515a61ef
commit ba1590f253

View File

@ -2,7 +2,6 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use DB;
class CreatePostsTable extends Migration class CreatePostsTable extends Migration
{ {
@ -31,6 +30,8 @@ class CreatePostsTable extends Migration
$table->integer('hide_user_id')->unsigned()->nullable(); $table->integer('hide_user_id')->unsigned()->nullable();
$table->unique(['discussion_id', 'number']); $table->unique(['discussion_id', 'number']);
$table->engine = 'MyISAM';
}); });
DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)'); DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)');