fix(SPG-525) BE-Form Tax-Value Tax bisa koma - float
parent
84e65d2599
commit
af6266c8d6
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateColumnTax1718675739425 implements MigrationInterface {
|
||||||
|
name = 'UpdateColumnTax1718675739425'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "taxes" DROP COLUMN "value"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "taxes" ADD "value" double precision NOT NULL DEFAULT '0'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "taxes" DROP COLUMN "value"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "taxes" ADD "value" integer NOT NULL DEFAULT '0'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -8,6 +8,6 @@ export class TaxModel extends BaseStatusModel<TaxEntity> implements TaxEntity {
|
||||||
@Column('varchar', { name: 'name' })
|
@Column('varchar', { name: 'name' })
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@Column('int', { name: 'value', default: 0 })
|
@Column('float', { name: 'value', default: 0 })
|
||||||
value: number;
|
value: number;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue