Skip to content

Commit

Permalink
Add indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
sunaurus committed Jul 19, 2023
1 parent b38ed67 commit f58d660
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ $$;

ALTER TABLE post_aggregates DROP COLUMN community_id, DROP COLUMN creator_id;

DROP INDEX idx_post_aggregates_community;
DROP INDEX idx_post_aggregates_creator;

Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ WHERE post.id = post_aggregates.post_id;

ALTER TABLE post_aggregates
ALTER COLUMN community_id SET NOT NULL,
ALTER COLUMN creator_id SET NOT NULL;
ALTER COLUMN creator_id SET NOT NULL;

CREATE INDEX idx_post_aggregates_community ON post_aggregates (community_id);
CREATE INDEX idx_post_aggregates_creator ON post_aggregates (creator_id);

0 comments on commit f58d660

Please sign in to comment.