Skip to content

Commit b47d773

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents a8d0a4a + 48bbf8d commit b47d773

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table('categories', function (Blueprint $table) {
15+
$table->index(['deleted_at']);
16+
});
17+
Schema::table('accessories', function (Blueprint $table) {
18+
$table->index(['deleted_at','category_id']);
19+
});
20+
Schema::table('consumables', function (Blueprint $table) {
21+
$table->index(['deleted_at','category_id']);
22+
});
23+
Schema::table('components', function (Blueprint $table) {
24+
$table->index(['deleted_at','category_id']);
25+
});
26+
Schema::table('licenses', function (Blueprint $table) {
27+
$table->index(['deleted_at','category_id']);
28+
});
29+
Schema::table('models', function (Blueprint $table) {
30+
$table->index(['deleted_at','category_id']);
31+
});
32+
33+
}
34+
35+
/**
36+
* Reverse the migrations.
37+
*/
38+
public function down(): void
39+
{
40+
Schema::table('categories', function (Blueprint $table) {
41+
$table->dropIndex(['deleted_at']);
42+
});
43+
Schema::table('accessories', function (Blueprint $table) {
44+
$table->dropIndex(['deleted_at','category_id']);
45+
});
46+
Schema::table('consumables', function (Blueprint $table) {
47+
$table->dropIndex(['deleted_at','category_id']);
48+
});
49+
Schema::table('components', function (Blueprint $table) {
50+
$table->dropIndex(['deleted_at','category_id']);
51+
});
52+
Schema::table('licenses', function (Blueprint $table) {
53+
$table->dropIndex(['deleted_at','category_id']);
54+
});
55+
Schema::table('models', function (Blueprint $table) {
56+
$table->dropIndex(['deleted_at','category_id']);
57+
});
58+
}
59+
};

0 commit comments

Comments
 (0)