Skip to content

Commit bdb75a7

Browse files
davidercruzclaude
andcommitted
Add IF NOT EXISTS / IF EXISTS guards to migration
Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 28ccade commit bdb75a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/migration/1770812936388-AddRejectionClassificationToOpportunityMatch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ export class AddRejectionClassificationToOpportunityMatch1770812936388
88
public async up(queryRunner: QueryRunner): Promise<void> {
99
await queryRunner.query(
1010
`ALTER TABLE "opportunity_match"
11-
ADD "rejectionClassification" jsonb`,
11+
ADD COLUMN IF NOT EXISTS "rejectionClassification" jsonb`,
1212
);
1313
}
1414

1515
public async down(queryRunner: QueryRunner): Promise<void> {
1616
await queryRunner.query(
1717
`ALTER TABLE "opportunity_match"
18-
DROP COLUMN "rejectionClassification"`,
18+
DROP COLUMN IF EXISTS "rejectionClassification"`,
1919
);
2020
}
2121
}

0 commit comments

Comments
 (0)