From b165fec66aaf62c33ed807c541b54f12e7aceddc Mon Sep 17 00:00:00 2001 From: r888888888 Date: Fri, 19 Feb 2016 09:29:03 -0800 Subject: [PATCH] add index on artist group_name --- .../20160219172840_add_index_to_artist_group_name.rb | 5 +++++ db/structure.sql | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 db/migrate/20160219172840_add_index_to_artist_group_name.rb diff --git a/db/migrate/20160219172840_add_index_to_artist_group_name.rb b/db/migrate/20160219172840_add_index_to_artist_group_name.rb new file mode 100644 index 000000000..5a0f5c5b8 --- /dev/null +++ b/db/migrate/20160219172840_add_index_to_artist_group_name.rb @@ -0,0 +1,5 @@ +class AddIndexToArtistGroupName < ActiveRecord::Migration + def change + add_index :artists, :group_name + end +end diff --git a/db/structure.sql b/db/structure.sql index a196a9229..91c4fa25c 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -4865,6 +4865,13 @@ CREATE INDEX index_artist_versions_on_name ON artist_versions USING btree (name) CREATE INDEX index_artist_versions_on_updater_id ON artist_versions USING btree (updater_id); +-- +-- Name: index_artists_on_group_name; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_artists_on_group_name ON artists USING btree (group_name); + + -- -- Name: index_artists_on_group_name_trgm; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -7304,3 +7311,5 @@ INSERT INTO schema_migrations (version) VALUES ('20160219004022'); INSERT INTO schema_migrations (version) VALUES ('20160219010854'); +INSERT INTO schema_migrations (version) VALUES ('20160219172840'); +