From 44a433b474eb61084c061dbcb488ab97a9220b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Fri, 28 Jul 2023 19:42:07 +0200 Subject: [PATCH] Update index creation to run with concurrent --- migrations/versions/2023_072819_01827104004b_.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/migrations/versions/2023_072819_01827104004b_.py b/migrations/versions/2023_072819_01827104004b_.py index 3449326a8..52ad44ad0 100644 --- a/migrations/versions/2023_072819_01827104004b_.py +++ b/migrations/versions/2023_072819_01827104004b_.py @@ -18,14 +18,15 @@ def upgrade(): + op.execute('commit') # ### commands auto generated by Alembic - please adjust! ### - op.create_index(op.f('ix_alias_hibp_last_check'), 'alias', ['hibp_last_check'], unique=False) - op.create_index('ix_bounce_created_at', 'bounce', ['created_at'], unique=False) - op.create_index('ix_monitoring_created_at', 'monitoring', ['created_at'], unique=False) - op.create_index('ix_transactional_email_created_at', 'transactional_email', ['created_at'], unique=False) - op.create_index(op.f('ix_users_activated'), 'users', ['activated'], unique=False) - op.create_index('ix_users_activated_trial_end_lifetime', 'users', ['activated', 'trial_end', 'lifetime'], unique=False) - op.create_index(op.f('ix_users_referral_id'), 'users', ['referral_id'], unique=False) + op.create_index(op.f('ix_alias_hibp_last_check'), 'alias', ['hibp_last_check'], unique=False, postgresql_concurrently=True) + op.create_index('ix_bounce_created_at', 'bounce', ['created_at'], unique=False, postgresql_concurrently=True) + op.create_index('ix_monitoring_created_at', 'monitoring', ['created_at'], unique=False, postgresql_concurrently=True) + op.create_index('ix_transactional_email_created_at', 'transactional_email', ['created_at'], unique=False, postgresql_concurrently=True) + op.create_index(op.f('ix_users_activated'), 'users', ['activated'], unique=False, postgresql_concurrently=True) + op.create_index('ix_users_activated_trial_end_lifetime', 'users', ['activated', 'trial_end', 'lifetime'], unique=False, postgresql_concurrently=True) + op.create_index(op.f('ix_users_referral_id'), 'users', ['referral_id'], unique=False, postgresql_concurrently=True) # ### end Alembic commands ###