/ip_addresses: add missing created_at, uploader_ip_addr indexes.

Add some missing indexes used by the /ip_addresses page.
This commit is contained in:
evazion
2019-11-11 20:34:44 -06:00
parent 73c02021a1
commit da8fbef5d6
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
class IndexTablesOnCreatedAt < ActiveRecord::Migration[6.0]
def change
add_index :artist_commentary_versions, :created_at
add_index :users, :created_at
add_index :comments, :created_at
add_index :posts, :uploader_ip_addr
end
end

View File

@@ -4763,6 +4763,13 @@ CREATE UNIQUE INDEX index_api_keys_on_user_id ON public.api_keys USING btree (us
CREATE UNIQUE INDEX index_artist_commentaries_on_post_id ON public.artist_commentaries USING btree (post_id);
--
-- Name: index_artist_commentary_versions_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_commentary_versions_on_created_at ON public.artist_commentary_versions USING btree (created_at);
--
-- Name: index_artist_commentary_versions_on_post_id; Type: INDEX; Schema: public; Owner: -
--
@@ -4931,6 +4938,12 @@ CREATE INDEX index_comment_votes_on_created_at ON public.comment_votes USING btr
CREATE INDEX index_comment_votes_on_user_id ON public.comment_votes USING btree (user_id);
--
-- Name: index_comments_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comments_on_created_at ON public.comments USING btree (created_at);
--
-- Name: index_comments_on_body_index; Type: INDEX; Schema: public; Owner: -
--
@@ -6932,6 +6945,12 @@ CREATE INDEX index_posts_on_tags_index ON public.posts USING gin (tag_index);
CREATE INDEX index_posts_on_uploader_id ON public.posts USING btree (uploader_id);
--
-- Name: index_posts_on_uploader_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_uploader_ip_addr ON public.posts USING btree (uploader_ip_addr);
--
-- Name: index_saved_searches_on_labels; Type: INDEX; Schema: public; Owner: -
@@ -7129,6 +7148,13 @@ CREATE INDEX index_user_name_change_requests_on_original_name ON public.user_nam
CREATE INDEX index_user_name_change_requests_on_user_id ON public.user_name_change_requests USING btree (user_id);
--
-- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at);
--
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
--