forked from e621ng/e621ng
posts: add partial indexes on is_pending, is_flagged.
This commit is contained in:
parent
bb0be36f05
commit
ec9a3e5c17
@ -0,0 +1,8 @@
|
||||
class AddPendingFlaggedIndexesToPosts < ActiveRecord::Migration
|
||||
def change
|
||||
Post.without_timeout do
|
||||
add_index :posts, :is_pending, where: "is_pending = true"
|
||||
add_index :posts, :is_flagged, where: "is_flagged = true"
|
||||
end
|
||||
end
|
||||
end
|
@ -6892,6 +6892,20 @@ CREATE INDEX index_posts_on_image_height ON posts USING btree (image_height);
|
||||
CREATE INDEX index_posts_on_image_width ON posts USING btree (image_width);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_posts_on_is_flagged; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_posts_on_is_flagged ON posts USING btree (is_flagged) WHERE (is_flagged = true);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_posts_on_is_pending; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_posts_on_is_pending ON posts USING btree (is_pending) WHERE (is_pending = true);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_posts_on_last_comment_bumped_at; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -7549,3 +7563,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170519204506');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170526183928');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170608043651');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user