fix index on tag name prefixes (#3858)
This commit is contained in:
7
db/migrate/20180913184128_fix_tag_prefix_index.rb
Normal file
7
db/migrate/20180913184128_fix_tag_prefix_index.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class FixTagPrefixIndex < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
execute "DROP INDEX index_tags_on_name_prefix"
|
||||
execute "CREATE INDEX index_tags_on_name_prefix ON tags USING gin (REGEXP_REPLACE(name, '([a-z0-9])[a-z0-9'']*($|[^a-z0-9'']+)', '\\1', 'g') gin_trgm_ops)"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user