fix(SPG-756) Untuk value field sales margin (%) seharusnya bisa mempunyai value dibelakang koma
parent
e401a1bf4c
commit
0e47b99ca7
|
@ -0,0 +1,17 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||||
|
|
||||||
|
export class UpdateTypeColumnItemTable1722587128195
|
||||||
|
implements MigrationInterface
|
||||||
|
{
|
||||||
|
name = 'UpdateTypeColumnItemTable1722587128195';
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "items" DROP COLUMN "sales_margin"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "items" ADD "sales_margin" numeric`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "items" DROP COLUMN "sales_margin"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "items" ADD "sales_margin" integer`);
|
||||||
|
}
|
||||||
|
}
|
|
@ -38,7 +38,7 @@ export class ItemModel
|
||||||
@Column('bigint', { name: 'hpp', nullable: true })
|
@Column('bigint', { name: 'hpp', nullable: true })
|
||||||
hpp: number;
|
hpp: number;
|
||||||
|
|
||||||
@Column('int', { name: 'sales_margin', nullable: true })
|
@Column('decimal', { name: 'sales_margin', nullable: true })
|
||||||
sales_margin: number;
|
sales_margin: number;
|
||||||
|
|
||||||
@Column('bigint', { name: 'total_price', nullable: true })
|
@Column('bigint', { name: 'total_price', nullable: true })
|
||||||
|
|
Loading…
Reference in New Issue