feat: add migration for table pos log
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
parent
39d7eb28b9
commit
746e24feb6
|
@ -0,0 +1,21 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||||
|
|
||||||
|
export class PosLogAddColumnDownBy1722509262047 implements MigrationInterface {
|
||||||
|
name = 'PosLogAddColumnDownBy1722509262047';
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "logs_pos" ADD "drawn_by_name" character varying`,
|
||||||
|
);
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "logs_pos" ADD "drawn_by_id" character varying`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "logs_pos" DROP COLUMN "drawn_by_id"`);
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "logs_pos" DROP COLUMN "drawn_by_name"`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue