Fix AddPermissionFlagRoleIdIndexFastInstanceCommand (#19654)

# Introduction
Index seemed to be missing in production only, as it's blocking the
whole migration release on other env that already implements the index
This commit is contained in:
Paul Rastoin
2026-04-13 18:14:31 +02:00
committed by GitHub
parent d2a99ef72d
commit 123d6241d7
@@ -9,11 +9,13 @@ export class AddPermissionFlagRoleIdIndexFastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
'CREATE INDEX "IDX_PERMISSION_FLAG_ROLE_ID" ON "core"."permissionFlag" ("roleId") ',
'CREATE INDEX IF NOT EXISTS "IDX_PERMISSION_FLAG_ROLE_ID" ON "core"."permissionFlag" ("roleId") ',
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('DROP INDEX "core"."IDX_PERMISSION_FLAG_ROLE_ID"');
await queryRunner.query(
'DROP INDEX IF EXISTS "core"."IDX_PERMISSION_FLAG_ROLE_ID"',
);
}
}