From d6a32006323fc6aceada4e4a382d242eede3702b Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Sat, 20 Sep 2025 15:55:10 +0200 Subject: [PATCH] Update migration --- db/migrate/20250918215512_add_h3_hex_ids_to_stats.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrate/20250918215512_add_h3_hex_ids_to_stats.rb b/db/migrate/20250918215512_add_h3_hex_ids_to_stats.rb index fb6966c7..cdb627e9 100644 --- a/db/migrate/20250918215512_add_h3_hex_ids_to_stats.rb +++ b/db/migrate/20250918215512_add_h3_hex_ids_to_stats.rb @@ -4,11 +4,11 @@ class AddH3HexIdsToStats < ActiveRecord::Migration[8.0] disable_ddl_transaction! def change - add_column :stats, :h3_hex_ids, :jsonb, default: {} + add_column :stats, :h3_hex_ids, :jsonb, default: {}, if_not_exists: true 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 + algorithm: :concurrently, if_not_exists: true end end end