Skip to content

Commit

Permalink
Add indices to Ra::StreetNameChange{Municipality,District} join tables
Browse files Browse the repository at this point in the history
  • Loading branch information
eronisko committed May 8, 2017
1 parent 217315b commit bc39f0a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class RaAddIndicesToStreetNameChangesJoinTables < ActiveRecord::Migration[5.0]
def change
add_index 'ra.street_name_changes_municipalities', 'street_name_change_id', name: 'street_name_changes_municipalities_change'
add_index 'ra.street_name_changes_municipalities', 'municipality_id', name: 'street_name_changes_municipalities_municipality'
add_index 'ra.street_name_changes_districts', 'street_name_change_id', name: 'street_name_changes_districts_change'
add_index 'ra.street_name_changes_districts', 'district_id', name: 'street_name_changes_districts_district'
end
end
31 changes: 30 additions & 1 deletion db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5368,6 +5368,34 @@ CREATE INDEX "index_ra.region_changes_on_change_id" ON region_changes USING btre
CREATE INDEX "index_ra.street_name_changes_on_change_id" ON street_name_changes USING btree (change_id);


--
-- Name: street_name_changes_districts_change; Type: INDEX; Schema: ra; Owner: -
--

CREATE INDEX street_name_changes_districts_change ON street_name_changes_districts USING btree (street_name_change_id);


--
-- Name: street_name_changes_districts_district; Type: INDEX; Schema: ra; Owner: -
--

CREATE INDEX street_name_changes_districts_district ON street_name_changes_districts USING btree (district_id);


--
-- Name: street_name_changes_municipalities_change; Type: INDEX; Schema: ra; Owner: -
--

CREATE INDEX street_name_changes_municipalities_change ON street_name_changes_municipalities USING btree (street_name_change_id);


--
-- Name: street_name_changes_municipalities_municipality; Type: INDEX; Schema: ra; Owner: -
--

CREATE INDEX street_name_changes_municipalities_municipality ON street_name_changes_municipalities USING btree (municipality_id);


SET search_path = rpo, pg_catalog;

--
Expand Down Expand Up @@ -6807,6 +6835,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20170502120756'),
('20170503112646'),
('20170503203539'),
('20170506104022');
('20170506104022'),
('20170506190014');


0 comments on commit bc39f0a

Please sign in to comment.