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:
+4
-2
@@ -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"',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user