mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 02:30:55 +00:00
feat(billing): add PAYMENT_PROCESSING invoice status on payment success redirect (all except CBE bill)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
/**
|
||||
* Adds PAYMENT_PROCESSING to the invoice status enum: the customer completed
|
||||
* provider checkout (success redirect) and settlement is awaiting the
|
||||
* provider webhook.
|
||||
*/
|
||||
export class InvoicePaymentProcessingStatus3260000000000
|
||||
implements MigrationInterface
|
||||
{
|
||||
name = "InvoicePaymentProcessingStatus3260000000000";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TYPE freight.invoices_status_enum ADD VALUE IF NOT EXISTS 'PAYMENT_PROCESSING' AFTER 'PENDING'`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(): Promise<void> {
|
||||
// Postgres cannot drop an enum value; PAYMENT_PROCESSING stays. Harmless.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user