From 7bda0ab5d4ae7f72045cd5119eeb46a2fae8f9cb Mon Sep 17 00:00:00 2001 From: ilham Date: Fri, 6 Jan 2023 13:23:52 +0700 Subject: [PATCH 1/2] fix: turn off sync --- src/app.module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.module.ts b/src/app.module.ts index a6673bb..f77dc54 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -45,7 +45,7 @@ import { MulterModule } from '@nestjs/platform-express'; password: configService.get('database.password'), database: configService.get('database.name'), entities: [], - synchronize: true, + synchronize: false, autoLoadEntities: true, logging: true, namingStrategy: new SnakeNamingStrategy(), From 5d203ef8b0ea51948c09fcac682928ab577bb638 Mon Sep 17 00:00:00 2001 From: ilham Date: Fri, 6 Jan 2023 13:28:14 +0700 Subject: [PATCH 2/2] fix: change column --- src/transaction/entities/coa.entity.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/transaction/entities/coa.entity.ts b/src/transaction/entities/coa.entity.ts index f05daa0..40547eb 100644 --- a/src/transaction/entities/coa.entity.ts +++ b/src/transaction/entities/coa.entity.ts @@ -13,7 +13,11 @@ export class COA extends BaseModel { @Column('text') balanceType: balanceType; - @Column() + @Column({ + type: 'numeric', + precision: 20, + scale: 2, + }) amount: number; @Column({