add no statement timeout block to migration

This commit is contained in:
r888888888
2017-12-13 15:06:25 -08:00
parent ab33c22da6
commit 41d4c33093

View File

@@ -1,9 +1,13 @@
class AddTrigramIndexToTags < ActiveRecord::Migration
def up
execute "create index index_tags_on_name_trgm on tags using gin (name gin_trgm_ops)"
Tag.without_timeout do
execute "create index index_tags_on_name_trgm on tags using gin (name gin_trgm_ops)"
end
end
def down
execute "drop index index_tags_on_name_trgm"
Tag.without_timeout do
execute "drop index index_tags_on_name_trgm"
end
end
end