add postgres modify tool

This commit is contained in:
chungyau97
2023-09-06 18:55:35 +08:00
parent d92ca34b00
commit 0d6d15ecf4
5 changed files with 20 additions and 7 deletions
@@ -2,10 +2,10 @@ import { MigrationInterface, QueryRunner } from 'typeorm'
export class ModifyChatFlow1693995626941 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "chat_flow" ALTER COLUMN "chatbotConfig" TYPE TEXT`)
await queryRunner.query(`ALTER TABLE "chat_flow" ALTER COLUMN "chatbotConfig" TYPE TEXT;`)
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "chat_flow" ALTER COLUMN "chatbotConfig" TYPE VARCHAR`)
await queryRunner.query(`ALTER TABLE "chat_flow" ALTER COLUMN "chatbotConfig" TYPE VARCHAR;`)
}
}