no message
This commit is contained in:
parent
7697d6d46a
commit
c0b920819d
6 changed files with 56 additions and 6 deletions
|
|
@ -0,0 +1,24 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateCommandReciveAddSalary11727260590227 implements MigrationInterface {
|
||||
name = 'UpdateCommandReciveAddSalary11727260590227'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` CHANGE \`fristName\` \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandSend\` CHANGE \`fristName\` \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandSend\` DROP COLUMN \`firstName\``);
|
||||
await queryRunner.query(`ALTER TABLE \`commandSend\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`commandSend\` DROP COLUMN \`firstName\``);
|
||||
await queryRunner.query(`ALTER TABLE \`commandSend\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandSend\` CHANGE \`firstName\` \`fristName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` CHANGE \`firstName\` \`fristName\` varchar(255) NULL COMMENT 'ชื่อ'`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateCommandReciveAddIsbangkok1727272904603 implements MigrationInterface {
|
||||
name = 'UpdateCommandReciveAddIsbangkok1727272904603'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`command\` ADD \`isBangkok\` tinyint NULL COMMENT 'คำสั่งกรุงเทพมหานคร'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`command\` DROP COLUMN \`isBangkok\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue