Commit 749c16b3 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix(migrations): correct column names in performance indexes

- campaigns: deadline -> application_deadline
- applications: creator_profile_id -> creator_id
- company_profiles: approval_status -> status
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 889d6e89
...@@ -16,20 +16,20 @@ return new class extends Migration ...@@ -16,20 +16,20 @@ return new class extends Migration
$this->addIndexIfNotExists('users', 'users_last_login_at_index', 'last_login_at'); $this->addIndexIfNotExists('users', 'users_last_login_at_index', 'last_login_at');
$this->addIndexIfNotExists('campaigns', 'campaigns_status_index', 'status'); $this->addIndexIfNotExists('campaigns', 'campaigns_status_index', 'status');
$this->addIndexIfNotExists('campaigns', 'campaigns_deadline_index', 'deadline'); $this->addIndexIfNotExists('campaigns', 'campaigns_application_deadline_perf_index', 'application_deadline');
$this->addCompositeIndexIfNotExists('campaigns', 'campaigns_status_deadline_index', ['status', 'deadline']); $this->addCompositeIndexIfNotExists('campaigns', 'campaigns_status_application_deadline_index', ['status', 'application_deadline']);
$this->addIndexIfNotExists('campaigns', 'campaigns_is_featured_index', 'is_featured'); $this->addIndexIfNotExists('campaigns', 'campaigns_is_featured_index', 'is_featured');
$this->addIndexIfNotExists('campaigns', 'campaigns_created_at_index', 'created_at'); $this->addIndexIfNotExists('campaigns', 'campaigns_created_at_index', 'created_at');
$this->addIndexIfNotExists('applications', 'applications_status_index', 'status'); $this->addIndexIfNotExists('applications', 'applications_status_index', 'status');
$this->addCompositeIndexIfNotExists('applications', 'applications_campaign_id_status_index', ['campaign_id', 'status']); $this->addCompositeIndexIfNotExists('applications', 'applications_campaign_id_status_index', ['campaign_id', 'status']);
$this->addCompositeIndexIfNotExists('applications', 'applications_creator_profile_id_status_index', ['creator_profile_id', 'status']); $this->addCompositeIndexIfNotExists('applications', 'applications_creator_id_status_index', ['creator_id', 'status']);
$this->addIndexIfNotExists('projects', 'projects_status_perf_index', 'status'); $this->addIndexIfNotExists('projects', 'projects_status_perf_index', 'status');
$this->addIndexIfNotExists('projects', 'projects_deadline_perf_index', 'deadline'); $this->addIndexIfNotExists('projects', 'projects_deadline_perf_index', 'deadline');
$this->addCompositeIndexIfNotExists('projects', 'projects_status_deadline_index', ['status', 'deadline']); $this->addCompositeIndexIfNotExists('projects', 'projects_status_deadline_index', ['status', 'deadline']);
$this->addCompositeIndexIfNotExists('projects', 'projects_company_id_status_index', ['company_id', 'status']); $this->addCompositeIndexIfNotExists('projects', 'projects_company_id_status_index', ['company_id', 'status']);
$this->addCompositeIndexIfNotExists('projects', 'projects_creator_id_status_index', ['creator_id', 'status']); $this->addCompositeIndexIfNotExists('projects', 'projects_creator_status_index', ['creator_id', 'status']);
$this->addIndexIfNotExists('deliverables', 'deliverables_status_index', 'status'); $this->addIndexIfNotExists('deliverables', 'deliverables_status_index', 'status');
$this->addCompositeIndexIfNotExists('deliverables', 'deliverables_project_id_status_index', ['project_id', 'status']); $this->addCompositeIndexIfNotExists('deliverables', 'deliverables_project_id_status_index', ['project_id', 'status']);
...@@ -48,7 +48,7 @@ return new class extends Migration ...@@ -48,7 +48,7 @@ return new class extends Migration
$this->addIndexIfNotExists('creator_profiles', 'creator_profiles_is_featured_index', 'is_featured'); $this->addIndexIfNotExists('creator_profiles', 'creator_profiles_is_featured_index', 'is_featured');
$this->addIndexIfNotExists('creator_profiles', 'creator_profiles_reputation_score_perf_index', 'reputation_score'); $this->addIndexIfNotExists('creator_profiles', 'creator_profiles_reputation_score_perf_index', 'reputation_score');
$this->addIndexIfNotExists('company_profiles', 'company_profiles_approval_status_index', 'approval_status'); $this->addIndexIfNotExists('company_profiles', 'company_profiles_status_index', 'status');
$this->addIndexIfNotExists('company_profiles', 'company_profiles_reputation_score_index', 'reputation_score'); $this->addIndexIfNotExists('company_profiles', 'company_profiles_reputation_score_index', 'reputation_score');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment