Skip to content

Commit

Permalink
Add missing indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
ofux committed Nov 19, 2024
1 parent 2bc725a commit 214b9fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE UNIQUE INDEX IF NOT EXISTS applications_applicant_id_project_id_id_idx ON public.applications USING btree (applicant_id, project_id, id);
CREATE UNIQUE INDEX IF NOT EXISTS erc20_blockchain_symbol_idx ON public.erc20 USING btree (blockchain, symbol);
CREATE UNIQUE INDEX IF NOT EXISTS p_user_project_recommendation_github_user_id_rank_project_i_idx ON public.p_user_project_recommendations USING btree (github_user_id, rank, project_id DESC NULLS LAST);
CREATE UNIQUE INDEX IF NOT EXISTS p_user_project_recommendations_github_user_id_project_id_idx ON public.p_user_project_recommendations USING btree (github_user_id, project_id DESC NULLS LAST);
CREATE UNIQUE INDEX IF NOT EXISTS p_user_project_recommendations_user_id_project_id_idx ON public.p_user_project_recommendations USING btree (user_id, project_id DESC NULLS LAST);
CREATE UNIQUE INDEX IF NOT EXISTS p_user_project_recommendations_user_id_rank_project_id_idx ON public.p_user_project_recommendations USING btree (user_id, rank, project_id DESC NULLS LAST);
CREATE UNIQUE INDEX IF NOT EXISTS pending_project_leader_invitation_github_user_id_project_id_idx ON public.pending_project_leader_invitations USING btree (github_user_id, project_id);
CREATE UNIQUE INDEX IF NOT EXISTS rewards_billing_profile_id_id_idx ON public.rewards USING btree (billing_profile_id, id);
CREATE UNIQUE INDEX IF NOT EXISTS rewards_id_billing_profile_id_idx ON public.rewards USING btree (id, billing_profile_id);
CREATE INDEX IF NOT EXISTS rewards_recipient_id_index ON public.rewards USING btree (recipient_id);
CREATE INDEX IF NOT EXISTS notifications_recipient_id_index ON iam.notifications USING btree (recipient_id);
CREATE UNIQUE INDEX IF NOT EXISTS notification_channels_notification_id_channel_read_at_index ON iam.notification_channels (notification_id, channel, read_at);
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ databaseChangeLog:
file: db/changelog/changelogs/00000024_add_assigned_by_into_contribution_contributors_data.sql
- include:
file: db/changelog/changelogs/00000025_add_merged_by_into_contribution_contributors_data.sql
- include:
file: db/changelog/changelogs/00000026_add_missing_indexes.sql

0 comments on commit 214b9fd

Please sign in to comment.