migration
This commit is contained in:
parent
b1a9c77c8c
commit
6cc6bed806
2 changed files with 23 additions and 3 deletions
|
|
@ -0,0 +1,20 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateSizeHeaderApiAndTokenApiFieldApiHistoryTable1762243747843 implements MigrationInterface {
|
||||
name = 'UpdateSizeHeaderApiAndTokenApiFieldApiHistoryTable1762243747843'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` DROP COLUMN \`headerApi\``);
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` ADD \`headerApi\` longtext NULL COMMENT 'header'`);
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` DROP COLUMN \`tokenApi\``);
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` ADD \`tokenApi\` longtext NULL COMMENT 'token'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` DROP COLUMN \`tokenApi\``);
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` ADD \`tokenApi\` varchar(255) NULL COMMENT 'token'`);
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` DROP COLUMN \`headerApi\``);
|
||||
await queryRunner.query(`ALTER TABLE \`apiHistory\` ADD \`headerApi\` varchar(255) NULL COMMENT 'header'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue