From: Tom Hughes Date: Thu, 12 Dec 2013 12:49:13 +0000 (+0000) Subject: Add an index on created_at to the note_comments table X-Git-Tag: live~5133 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0c8ed1938b80483a777f140e15de6020f4723a4a Add an index on created_at to the note_comments table --- diff --git a/db/migrate/20131212124700_add_created_at_index_to_note_comments.rb b/db/migrate/20131212124700_add_created_at_index_to_note_comments.rb new file mode 100644 index 000000000..832204734 --- /dev/null +++ b/db/migrate/20131212124700_add_created_at_index_to_note_comments.rb @@ -0,0 +1,5 @@ +class AddCreatedAtIndexToNoteComments < ActiveRecord::Migration + def change + add_index :note_comments, :created_at + end +end diff --git a/db/structure.sql b/db/structure.sql index 5769ea04e..e6165e9e7 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1797,6 +1797,13 @@ CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key); +-- +-- Name: index_note_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_note_comments_on_created_at ON note_comments USING btree (created_at); + + -- -- Name: index_oauth_nonces_on_nonce_and_timestamp; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -2379,6 +2386,8 @@ ALTER TABLE ONLY ways -- PostgreSQL database dump complete -- +SET search_path TO "$user",public; + INSERT INTO schema_migrations (version) VALUES ('1'); INSERT INTO schema_migrations (version) VALUES ('10'); @@ -2455,6 +2464,8 @@ INSERT INTO schema_migrations (version) VALUES ('20121203124841'); INSERT INTO schema_migrations (version) VALUES ('20130328184137'); +INSERT INTO schema_migrations (version) VALUES ('20131212124700'); + INSERT INTO schema_migrations (version) VALUES ('21'); INSERT INTO schema_migrations (version) VALUES ('22'); @@ -2541,4 +2552,4 @@ INSERT INTO schema_migrations (version) VALUES ('7'); INSERT INTO schema_migrations (version) VALUES ('8'); -INSERT INTO schema_migrations (version) VALUES ('9'); \ No newline at end of file +INSERT INTO schema_migrations (version) VALUES ('9');