More indexing for DB queries

This commit is contained in:
David Bomba 2022-10-06 18:54:13 +11:00
parent 3c4dd84a4f
commit 0a405f9329

View File

@ -16,6 +16,17 @@ return new class extends Migration
Schema::table('products', function (Blueprint $table) { Schema::table('products', function (Blueprint $table) {
$table->index(['product_key', 'company_id']); $table->index(['product_key', 'company_id']);
}); });
Schema::table('companies', function (Blueprint $table) {
$table->index(['subdomain', 'portal_mode']);
$table->index(['portal_domain', 'portal_mode']);
$table->index('company_key');
});
Schema::table('accounts', function (Blueprint $table) {
$table->index('key');
});
} }
/** /**
@ -25,8 +36,6 @@ return new class extends Migration
*/ */
public function down() public function down()
{ {
Schema::table('products', function (Blueprint $table) {
//
});
} }
}; };