Merge pull request #935 from RickCarlino/more_indexes

Add a few more indexes
pull/937/head
Rick Carlino 2018-07-26 13:19:10 -05:00 committed by GitHub
commit e8abdb1bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,5 @@
class AddMoreMoreLogIndexes < ActiveRecord::Migration[5.2]
def change
add_index :logs, [:device_id, :created_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_device_id_and_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_logs_on_device_id_and_created_at ON public.logs USING btree (device_id, created_at);
--
-- Name: index_logs_on_sent_at; Type: INDEX; Schema: public; Owner: -
--
@ -2287,6 +2294,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20180716163108'),
('20180719143412'),
('20180720021451'),
('20180726145505');
('20180726145505'),
('20180726165546');