mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 03:03:41 +00:00
optimize: 创建数据库表索引
This commit is contained in:
parent
605f71ca07
commit
c6d874ad59
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class UpdateTableIndexes extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('web_socket_dialog_msg_reads', function (Blueprint $table) {
|
||||||
|
$table->index(['userid', 'read_at', 'dialog_id']);
|
||||||
|
});
|
||||||
|
Schema::table('web_socket_dialog_msgs', function (Blueprint $table) {
|
||||||
|
$table->index('dialog_id');
|
||||||
|
$table->index('dialog_type');
|
||||||
|
$table->index('userid');
|
||||||
|
});
|
||||||
|
Schema::table('task_workers', function (Blueprint $table) {
|
||||||
|
$table->index('deleted_at');
|
||||||
|
});
|
||||||
|
Schema::table('project_tasks', function (Blueprint $table) {
|
||||||
|
$table->index(['parent_id', 'deleted_at']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user