From 893db7558e1d0a7329d9414d8d3e7a98c140fae5 Mon Sep 17 00:00:00 2001 From: Paul Rastoin <45004772+prastoin@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:22:41 +0200 Subject: [PATCH] Fix instance fast migration, fallback index creation (#23149) Review in cubic --- ...784650048045-add-statuses-to-billing-subscription-index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-23/2-23-instance-command-slow-1784650048045-add-statuses-to-billing-subscription-index.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-23/2-23-instance-command-slow-1784650048045-add-statuses-to-billing-subscription-index.ts index 2e257e3389..27fe6fd148 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-23/2-23-instance-command-slow-1784650048045-add-statuses-to-billing-subscription-index.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-23/2-23-instance-command-slow-1784650048045-add-statuses-to-billing-subscription-index.ts @@ -19,7 +19,7 @@ export class AddStatusesToBillingSubscriptionIndexSlowInstanceCommand } await queryRunner.query( - 'DROP INDEX "core"."IDX_BILLING_SUBSCRIPTION_WORKSPACE_ID_UNIQUE"', + 'DROP INDEX IF EXISTS "core"."IDX_BILLING_SUBSCRIPTION_WORKSPACE_ID_UNIQUE"', ); await queryRunner.query( `CREATE UNIQUE INDEX "IDX_BILLING_SUBSCRIPTION_WORKSPACE_ID_UNIQUE" ON "core"."billingSubscription" ("workspaceId") WHERE status IN ('trialing', 'active', 'past_due', 'incomplete', 'incomplete_expired', 'unpaid', 'paused')`, @@ -36,7 +36,7 @@ export class AddStatusesToBillingSubscriptionIndexSlowInstanceCommand } await queryRunner.query( - 'DROP INDEX "core"."IDX_BILLING_SUBSCRIPTION_WORKSPACE_ID_UNIQUE"', + 'DROP INDEX IF EXISTS "core"."IDX_BILLING_SUBSCRIPTION_WORKSPACE_ID_UNIQUE"', ); await queryRunner.query( `CREATE UNIQUE INDEX "IDX_BILLING_SUBSCRIPTION_WORKSPACE_ID_UNIQUE" ON "core"."billingSubscription" ("workspaceId") WHERE status IN ('trialing', 'active', 'past_due')`,