Add if_not_exists: true to migration (#18687)
This commit is contained in:
parent
768eb219ef
commit
010cc9f617
1 changed files with 1 additions and 1 deletions
|
|
@ -4,6 +4,6 @@ class AddIndexToDisplayAdsCachedTagList < ActiveRecord::Migration[7.0]
|
|||
def change
|
||||
# From <https://www.postgresql.org/docs/11/pgtrgm.html#id-1.11.7.40.7>
|
||||
# We need a GIN index on `cached_tag_list` to speed up `LIKE` queries
|
||||
add_index :display_ads, :cached_tag_list, using: :gin, opclass: :gin_trgm_ops, algorithm: :concurrently
|
||||
add_index :display_ads, :cached_tag_list, using: :gin, opclass: :gin_trgm_ops, algorithm: :concurrently, if_not_exists: true
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue