started to add indexes and fixed N+1 issue
This commit is contained in:
-17
@@ -25,21 +25,4 @@ return new class extends Migration {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', static function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('users', 'helpdesk_admin')) {
|
||||
$table->dropColumn('helpdesk_admin');
|
||||
}
|
||||
|
||||
if (Schema::hasColumn('users', 'helpdesk_agent')) {
|
||||
$table->dropColumn('helpdesk_agent');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
+2
-12
@@ -6,8 +6,8 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/** @return void */
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('helpdesk_statuses', static function (Blueprint $table): void {
|
||||
@@ -70,14 +70,4 @@ return new class extends Migration {
|
||||
$table->unique(['company_id', 'slug']);
|
||||
});
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('helpdesk_projects');
|
||||
Schema::dropIfExists('helpdesk_teams');
|
||||
Schema::dropIfExists('helpdesk_categories');
|
||||
Schema::dropIfExists('helpdesk_priorities');
|
||||
Schema::dropIfExists('helpdesk_statuses');
|
||||
}
|
||||
};
|
||||
|
||||
-5
@@ -39,9 +39,4 @@ return new class extends Migration {
|
||||
});
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('helpdesk_tickets');
|
||||
}
|
||||
};
|
||||
|
||||
-8
@@ -76,12 +76,4 @@ return new class extends Migration {
|
||||
});
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('helpdesk_workflow_logs');
|
||||
Schema::dropIfExists('helpdesk_workflow_templates');
|
||||
Schema::dropIfExists('helpdesk_git_commits');
|
||||
Schema::dropIfExists('helpdesk_git_repositories');
|
||||
}
|
||||
};
|
||||
|
||||
-6
@@ -38,10 +38,4 @@ return new class extends Migration {
|
||||
});
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('helpdesk_attachments');
|
||||
Schema::dropIfExists('helpdesk_comments');
|
||||
}
|
||||
};
|
||||
|
||||
+2
-8
@@ -6,8 +6,8 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/** @return void */
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('helpdesk_category_user', static function (Blueprint $table): void {
|
||||
@@ -18,10 +18,4 @@ return new class extends Migration {
|
||||
$table->unique(['category_id', 'user_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('helpdesk_category_user');
|
||||
}
|
||||
};
|
||||
|
||||
-9
@@ -53,13 +53,4 @@ class HelpdeskPerformanceIndexes extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user