diff --git a/database/migrations/2024_09_10_indexes.php b/database/migrations/2024_09_10_indexes.php new file mode 100644 index 0000000..e316942 --- /dev/null +++ b/database/migrations/2024_09_10_indexes.php @@ -0,0 +1,38 @@ +index(['created_at']); + $table->index(['datetime']); + }); + + DB::statement('CREATE INDEX echomail_seenby_unsent ON echomail_seenby (address_id,echomail_id) WHERE sent_at IS NULL AND export_at IS NOT NULL;'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('echomails', function (Blueprint $table) { + $table->dropIndex(['created_at']); + $table->dropIndex(['datetime']); + }); + + DB::statement('DROP INDEX echomail_seenby_unsent'); + } +}; diff --git a/resources/views/domain/list.blade.php b/resources/views/domain/list.blade.php index 35d3e1a..2516a67 100644 --- a/resources/views/domain/list.blade.php +++ b/resources/views/domain/list.blade.php @@ -39,7 +39,7 @@ use App\Models\{Address,Domain};