mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 21:15:41 +00:00
fix(migrations): use CREATE TYPE IF NOT EXISTS for invoices enum
Allows migration to run when enum already exists in prod DB. Prevents 'type already exists' error on redeployment. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ export class CreateInvoices1821000000002 implements MigrationInterface {
|
|||||||
|
|
||||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`
|
await queryRunner.query(`
|
||||||
CREATE TYPE freight.invoices_status_enum AS ENUM (
|
CREATE TYPE IF NOT EXISTS freight.invoices_status_enum AS ENUM (
|
||||||
'DRAFT',
|
'DRAFT',
|
||||||
'PENDING',
|
'PENDING',
|
||||||
'PAID',
|
'PAID',
|
||||||
|
|||||||
Reference in New Issue
Block a user