migrate db

This commit is contained in:
Kittapath 2024-02-20 17:19:41 +07:00
parent 185fcf1756
commit c42256a5b7

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTablePosAddIsSpecial1708424171885 implements MigrationInterface {
name = 'UpdateTablePosAddIsSpecial1708424171885'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salarys\` ADD \`isSpecial\` tinyint NOT NULL COMMENT 'ฉ' DEFAULT 0`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salarys\` DROP COLUMN \`isSpecial\``);
}
}