mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
fix: calculating child and parent balance
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddReservationAmountToAccountEntity1757433339849 implements MigrationInterface {
|
||||
name = 'AddReservationAmountToAccountEntity1757433339849';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "accounts" ADD "reserved_balance" numeric(10,2) NOT NULL DEFAULT '0'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "accounts" DROP COLUMN "reserved_balance"`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user