From 0844024c8e68ae0031e143d6094793f0aa32bc22 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 26 Oct 2023 19:58:11 +0100 Subject: [PATCH] Build new relation member indexes concurrently --- ...20231010194809_correct_relation_members_primary_key.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrate/20231010194809_correct_relation_members_primary_key.rb b/db/migrate/20231010194809_correct_relation_members_primary_key.rb index e1f7dcf46..84388063e 100644 --- a/db/migrate/20231010194809_correct_relation_members_primary_key.rb +++ b/db/migrate/20231010194809_correct_relation_members_primary_key.rb @@ -2,12 +2,12 @@ class CorrectRelationMembersPrimaryKey < ActiveRecord::Migration[7.0] disable_ddl_transaction! def up - alter_primary_key :current_relation_members, [:relation_id, :sequence_id] - alter_primary_key :relation_members, [:relation_id, :version, :sequence_id] + alter_primary_key :current_relation_members, [:relation_id, :sequence_id], :algorithm => :concurrently + alter_primary_key :relation_members, [:relation_id, :version, :sequence_id], :algorithm => :concurrently end def down - alter_primary_key :relation_members, [:relation_id, :version, :member_type, :member_id, :member_role, :sequence_id] - alter_primary_key :current_relation_members, [:relation_id, :member_type, :member_id, :member_role, :sequence_id] + alter_primary_key :relation_members, [:relation_id, :version, :member_type, :member_id, :member_role, :sequence_id], :algorithm => :concurrently + alter_primary_key :current_relation_members, [:relation_id, :member_type, :member_id, :member_role, :sequence_id], :algorithm => :concurrently end end -- 2.39.5