Skip to content

Commit

Permalink
Merge pull request #1738 from bakaphp/feat-download-all-zoho-leads
Browse files Browse the repository at this point in the history
refact: add new index
  • Loading branch information
kaioken authored Jul 27, 2024
2 parents 2274be2 + db8682b commit 45b9f47
Showing 1 changed file with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users_associated_company', function (Blueprint $table) {
$table->index(['companies_id', 'is_deleted']);
});

Schema::table('users_associated_apps', function (Blueprint $table) {
$table->index(['apps_id', 'companies_id']);
});

Schema::table('companies_branches', function (Blueprint $table) {
$table->index('is_deleted');
$table->index(['companies_id', 'is_deleted']);
$table->index(['uuid', 'companies_id', 'is_deleted']);
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users_associated_company', function (Blueprint $table) {
$table->dropIndex(['companies_id', 'is_deleted']);
});

Schema::table('users_associated_apps', function (Blueprint $table) {
$table->dropIndex(['apps_id', 'companies_id']);
});

Schema::table('companies_branches', function (Blueprint $table) {
$table->dropIndex(['is_deleted']);
$table->dropIndex(['companies_id', 'is_deleted']);
$table->dropIndex(['uuid', 'companies_id', 'is_deleted']);
});
}
};

0 comments on commit 45b9f47

Please sign in to comment.