Skip to content

Commit 6f40cb4

Browse files
authored
Merge pull request #1120 from code-corps/add-missing-indexes
Add missing indexes to the database
2 parents 5a195b1 + f326b2e commit 6f40cb4

File tree

4 files changed

+358
-7
lines changed

4 files changed

+358
-7
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
defmodule CodeCorps.Repo.Migrations.AddMissingIndexes do
2+
use Ecto.Migration
3+
4+
def change do
5+
create index(:comments, [:github_comment_id])
6+
create index(:github_comments, [:github_issue_id])
7+
create index(:github_issues, [:github_repo_id])
8+
create index(:github_issues, [:github_pull_request_id])
9+
create index(:github_pull_requests, [:github_repo_id])
10+
create index(:organizations, [:owner_id])
11+
create index(:previews, [:user_id])
12+
create index(:project_categories, [:category_id])
13+
create index(:project_categories, [:project_id])
14+
create index(:project_github_repos, [:github_repo_id])
15+
create index(:project_github_repos, [:project_id])
16+
create index(:project_users, [:project_id])
17+
create index(:project_users, [:user_id])
18+
create index(:projects, [:organization_id])
19+
create index(:role_skills, [:role_id])
20+
create index(:role_skills, [:skill_id])
21+
create index(:slugged_routes, [:organization_id])
22+
create index(:slugged_routes, [:user_id])
23+
create index(:stripe_connect_cards, [:stripe_connect_account_id])
24+
create index(:stripe_connect_charges, [:stripe_connect_account_id])
25+
create index(:stripe_connect_charges, [:stripe_connect_customer_id])
26+
create index(:stripe_connect_charges, [:user_id])
27+
create index(:stripe_connect_customers, [:stripe_platform_customer_id])
28+
create index(:stripe_connect_customers, [:user_id])
29+
create index(:stripe_external_accounts, [:stripe_connect_account_id])
30+
create index(:stripe_file_upload, [:stripe_connect_account_id])
31+
create index(:stripe_invoices, [:stripe_connect_subscription_id])
32+
create index(:stripe_invoices, [:user_id])
33+
create index(:task_skills, [:task_id])
34+
create index(:task_skills, [:skill_id])
35+
create index(:tasks, [:github_issue_id])
36+
create index(:tasks, [:github_repo_id])
37+
create index(:tasks, [:task_list_id])
38+
create index(:user_categories, [:category_id])
39+
create index(:user_categories, [:user_id])
40+
create index(:user_roles, [:role_id])
41+
create index(:user_roles, [:user_id])
42+
create index(:user_skills, [:skill_id])
43+
create index(:user_skills, [:user_id])
44+
create index(:user_tasks, [:task_id])
45+
create index(:user_tasks, [:user_id])
46+
end
47+
end

0 commit comments

Comments
 (0)