Indexes for performance improvements, improved FTN regex
This commit is contained in:
47
database/migrations/2022_10_23_092332_seenby_index.php
Normal file
47
database/migrations/2022_10_23_092332_seenby_index.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('echomail_seenby', function (Blueprint $table) {
|
||||
$table->index(['echomail_id','address_id']);
|
||||
$table->index(['packet']);
|
||||
$table->index(['sent_at']);
|
||||
$table->index(['export_at']);
|
||||
});
|
||||
|
||||
Schema::table('echomails', function (Blueprint $table) {
|
||||
$table->index(['msgid']);
|
||||
$table->index(['replyid']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('echomails', function (Blueprint $table) {
|
||||
$table->dropIndex(['msgid']);
|
||||
$table->dropIndex(['replyid']);
|
||||
});
|
||||
Schema::table('echomail_seenby', function (Blueprint $table) {
|
||||
$table->dropIndex(['packet']);
|
||||
$table->dropIndex(['sent_at']);
|
||||
$table->dropIndex(['export_at']);
|
||||
$table->dropIndex(['echomail_id','address_id']);
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user