Skip to content

Commit

Permalink
fix: skip if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
abuaboud committed Nov 15, 2024
1 parent 3942924 commit 3703ec2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export class AddAuditLogIndicies1731711188507 implements MigrationInterface {
DROP INDEX CONCURRENTLY IF EXISTS "public"."audit_event_platform_id_project_id_user_id_idx"
`)
await queryRunner.query(`
CREATE INDEX CONCURRENTLY "audit_event_platform_id_project_id_user_id_action_idx" ON "audit_event" ("platformId", "projectId", "userId", "action")
CREATE INDEX CONCURRENTLY IF NOT EXISTS "audit_event_platform_id_project_id_user_id_action_idx" ON "audit_event" ("platformId", "projectId", "userId", "action")
`)
await queryRunner.query(`
CREATE INDEX CONCURRENTLY "audit_event_platform_id_user_id_action_idx" ON "audit_event" ("platformId", "userId", "action")
CREATE INDEX CONCURRENTLY IF NOT EXISTS "audit_event_platform_id_user_id_action_idx" ON "audit_event" ("platformId", "userId", "action")
`)
await queryRunner.query(`
CREATE INDEX CONCURRENTLY "audit_event_platform_id_action_idx" ON "audit_event" ("platformId", "action")
CREATE INDEX CONCURRENTLY IF NOT EXISTS "audit_event_platform_id_action_idx" ON "audit_event" ("platformId", "action")
`)
}

Expand All @@ -36,7 +36,7 @@ export class AddAuditLogIndicies1731711188507 implements MigrationInterface {
DROP INDEX CONCURRENTLY IF EXISTS "public"."audit_event_platform_id_project_id_user_id_action_idx"
`)
await queryRunner.query(`
CREATE INDEX CONCURRENTLY "audit_event_platform_id_project_id_user_id_idx" ON "audit_event" ("platformId", "projectId", "userId")
CREATE INDEX CONCURRENTLY IF NOT EXISTS "audit_event_platform_id_project_id_user_id_idx" ON "audit_event" ("platformId", "projectId", "userId")
`)
}

Expand Down

0 comments on commit 3703ec2

Please sign in to comment.