add trigram indexes for artists and pools
This commit is contained in:
13
db/migrate/20160219010854_add_trigram_indexes_to_artists.rb
Normal file
13
db/migrate/20160219010854_add_trigram_indexes_to_artists.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class AddTrigramIndexesToArtists < ActiveRecord::Migration
|
||||
def up
|
||||
execute "create index index_artists_on_name_trgm on artists using gin (name gin_trgm_ops)"
|
||||
execute "create index index_artists_on_group_name_trgm on artists using gin (group_name gin_trgm_ops)"
|
||||
execute "create index index_artists_on_other_names_trgm on artists using gin (other_names gin_trgm_ops)"
|
||||
end
|
||||
|
||||
def down
|
||||
execute "drop index index_artists_on_other_names_trgm"
|
||||
execute "drop index index_artists_on_group_name_trgm"
|
||||
execute "drop index index_artists_on_name_trgm"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user