We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b03c0da + 98ee770 commit 473d988Copy full SHA for 473d988
database/migrations/add_index_to_subject.php.stub
@@ -0,0 +1,22 @@
1
+<?php
2
+
3
+use Illuminate\Database\Migrations\Migration;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Support\Facades\Schema;
6
7
+return new class extends Migration
8
+{
9
+ public function up(): void
10
+ {
11
+ Schema::table('filament_comments', function (Blueprint $table) {
12
+ $table->index(['subject_type', 'subject_id']);
13
+ });
14
+ }
15
16
+ public function down(): void
17
18
19
+ $table->dropIndex(['subject_type', 'subject_id']);
20
21
22
+};
src/FilamentCommentsServiceProvider.php
@@ -85,6 +85,7 @@ protected function getMigrations(): array
85
{
86
return [
87
'create_filament_comments_table',
88
+ 'add_index_to_subject',
89
];
90
}
91
0 commit comments