/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:
8
db/migrate/20191111024520_index_tables_on_created_at.rb
Normal file
8
db/migrate/20191111024520_index_tables_on_created_at.rb
Normal 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
|
||||||
@@ -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);
|
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: -
|
-- 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);
|
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: -
|
-- 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);
|
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: -
|
-- 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);
|
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: -
|
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user