Add indexes for updated_at, sent_at

pull/934/head
Rick Carlino 2018-07-26 10:12:28 -05:00
parent d991fb383d
commit d03d9bbbb9
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,6 @@
class AddMoreLogIndexes < ActiveRecord::Migration[5.2]
def change
add_index :logs, :updated_at
add_index :logs, :sent_at
end
end

View File

@ -1827,6 +1827,13 @@ CREATE INDEX index_logs_on_created_at ON public.logs USING btree (created_at);
CREATE INDEX index_logs_on_device_id ON public.logs USING btree (device_id);
--
-- Name: index_logs_on_sent_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_logs_on_sent_at ON public.logs USING btree (sent_at);
--
-- Name: index_logs_on_type; Type: INDEX; Schema: public; Owner: -
--
@ -1834,6 +1841,13 @@ CREATE INDEX index_logs_on_device_id ON public.logs USING btree (device_id);
CREATE INDEX index_logs_on_type ON public.logs USING btree (type);
--
-- Name: index_logs_on_updated_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_logs_on_updated_at ON public.logs USING btree (updated_at);
--
-- Name: index_logs_on_verbosity; Type: INDEX; Schema: public; Owner: -
--
@ -2272,6 +2286,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20180713182937'),
('20180716163108'),
('20180719143412'),
('20180720021451');
('20180720021451'),
('20180726145505');