1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Really rough fulltext driver implementation

This commit is contained in:
Toby Zerner
2015-06-04 11:11:56 +09:30
parent 944e5c649c
commit 6144e427d2
5 changed files with 43 additions and 7 deletions

View File

@@ -2,6 +2,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use DB;
class CreatePostsTable extends Migration
{
@@ -14,7 +15,6 @@ class CreatePostsTable extends Migration
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('discussion_id')->unsigned();
$table->integer('number')->unsigned()->nullable();
@@ -29,10 +29,11 @@ class CreatePostsTable extends Migration
$table->integer('edit_user_id')->unsigned()->nullable();
$table->dateTime('hide_time')->nullable();
$table->integer('hide_user_id')->unsigned()->nullable();
$table->unique(['discussion_id', 'number']);
});
// add fulltext index to content (and title?)
// add unique index on [discussion_id, number] !!!
DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)');
}
/**