17 lines
755 B
TypeScript
17 lines
755 B
TypeScript
|
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||
|
|
|
||
|
|
export class UpdateTablePosAddIsSpecial1708423229800 implements MigrationInterface {
|
||
|
|
name = 'UpdateTablePosAddIsSpecial1708423229800'
|
||
|
|
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.query(`ALTER TABLE \`posDict\` ADD \`isSpacial\` tinyint NOT NULL COMMENT 'ฉ' DEFAULT 0`);
|
||
|
|
await queryRunner.query(`ALTER TABLE \`position\` ADD \`isSpacial\` tinyint NOT NULL COMMENT 'ฉ' DEFAULT 0`);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.query(`ALTER TABLE \`position\` DROP COLUMN \`isSpacial\``);
|
||
|
|
await queryRunner.query(`ALTER TABLE \`posDict\` DROP COLUMN \`isSpacial\``);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|