mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Add safety_assured block for index creation
This commit is contained in:
parent
482c0928fe
commit
f223feb854
1 changed files with 5 additions and 3 deletions
|
|
@ -5,8 +5,10 @@ class AddH3HexIdsToStats < ActiveRecord::Migration[8.0]
|
|||
|
||||
def change
|
||||
add_column :stats, :h3_hex_ids, :jsonb, default: {}
|
||||
add_index :stats, :h3_hex_ids, using: :gin,
|
||||
where: "(h3_hex_ids IS NOT NULL AND h3_hex_ids != '{}'::jsonb)",
|
||||
algorithm: :concurrently
|
||||
safety_assured do
|
||||
add_index :stats, :h3_hex_ids, using: :gin,
|
||||
where: "(h3_hex_ids IS NOT NULL AND h3_hex_ids != '{}'::jsonb)",
|
||||
algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue