Skip to content

Commit

Permalink
Add index to document type
Browse files Browse the repository at this point in the history
This will speed up the document type search in Feedex.

For: https://trello.com/c/IB9P5EyE/266-introduce-new-browse-options-for-feedex
  • Loading branch information
elenatanasoiu committed Jan 8, 2018
1 parent a3e0c81 commit 1365d5b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions db/migrate/20180108153838_add_index_to_document_type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddIndexToDocumentType < ActiveRecord::Migration[5.0]
def change
add_index :content_items, :document_type
end
end
10 changes: 9 additions & 1 deletion db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,13 @@ CREATE INDEX index_anonymous_contacts_on_created_at_and_path ON anonymous_contac
CREATE INDEX index_anonymous_contacts_on_path ON anonymous_contacts USING btree (path varchar_pattern_ops);


--
-- Name: index_content_items_on_document_type; Type: INDEX; Schema: public; Owner: -; Tablespace:
--

CREATE INDEX index_content_items_on_document_type ON content_items USING btree (document_type);


--
-- Name: index_content_items_organisations_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
Expand Down Expand Up @@ -411,6 +418,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20160822145924'),
('20160826105129'),
('20171204124407'),
('20171204155340');
('20171204155340'),
('20180108153838');


0 comments on commit 1365d5b

Please sign in to comment.