File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
+ Schema::table('filament_comments', function (Blueprint $table) {
19
+ $table->dropIndex(['subject_type', 'subject_id']);
20
+ });
21
+ }
22
+ };
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ protected function getMigrations(): array
85
85
{
86
86
return [
87
87
'create_filament_comments_table ' ,
88
+ 'add_index_to_subject ' ,
88
89
];
89
90
}
90
91
}
You can’t perform that action at this time.
0 commit comments