dmails: add indexes on is_read and is_deleted (fix #2886).
This commit is contained in:
7
db/migrate/20170218104710_add_indexes_to_dmails.rb
Normal file
7
db/migrate/20170218104710_add_indexes_to_dmails.rb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
class AddIndexesToDmails < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
execute "set statement_timeout = 0"
|
||||||
|
add_index :dmails, :is_read
|
||||||
|
add_index :dmails, :is_deleted
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -5084,6 +5084,20 @@ CREATE UNIQUE INDEX index_dmail_filters_on_user_id ON dmail_filters USING btree
|
|||||||
CREATE INDEX index_dmails_on_creator_ip_addr ON dmails USING btree (creator_ip_addr);
|
CREATE INDEX index_dmails_on_creator_ip_addr ON dmails USING btree (creator_ip_addr);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_dmails_on_is_deleted; Type: INDEX; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX index_dmails_on_is_deleted ON dmails USING btree (is_deleted);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_dmails_on_is_read; Type: INDEX; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX index_dmails_on_is_read ON dmails USING btree (is_read);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: index_dmails_on_message_index; Type: INDEX; Schema: public; Owner: -
|
-- Name: index_dmails_on_message_index; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@@ -7450,3 +7464,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170112060921');
|
|||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20170117233040');
|
INSERT INTO schema_migrations (version) VALUES ('20170117233040');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20170218104710');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user