mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-25 08:27:55 +00:00
feat: handle card status changed webhook
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateCardTable1753098116701 implements MigrationInterface {
|
||||
name = 'UpdateCardTable1753098116701'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "cards" ADD "statusDescription" character varying NOT NULL DEFAULT 'PENDING_ACTIVATION'`);
|
||||
await queryRunner.query(`ALTER TABLE "cards" ADD "limit" numeric(10,2) NOT NULL DEFAULT '0'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "cards" DROP COLUMN "limit"`);
|
||||
await queryRunner.query(`ALTER TABLE "cards" DROP COLUMN "statusDescription"`);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class EditCustomerTable1753098326876 implements MigrationInterface {
|
||||
name = 'EditCustomerTable1753098326876'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "customers" RENAME COLUMN "waiting_number" TO "application_number"`);
|
||||
await queryRunner.query(`ALTER SEQUENCE "customers_waiting_number_seq" RENAME TO "customers_application_number_seq"`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER SEQUENCE "customers_application_number_seq" RENAME TO "customers_waiting_number_seq"`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" RENAME COLUMN "application_number" TO "waiting_number"`);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,3 +29,5 @@ export * from './1749633935436-create-card-entity';
|
||||
export * from './1751456987627-create-account-entity';
|
||||
export * from './1751466314709-create-transaction-table';
|
||||
export * from './1752056898465-edit-transaction-table';
|
||||
export * from './1753098116701-update-card-table';
|
||||
export * from './1753098326876-edit-customer-table';
|
||||
|
||||
Reference in New Issue
Block a user