add postgres modify chatmessage

This commit is contained in:
chungyau97
2023-09-06 18:43:52 +08:00
parent 6f1f5ef06b
commit 5facb8fba8
2 changed files with 13 additions and 1 deletions
@@ -0,0 +1,11 @@
import { MigrationInterface, QueryRunner } from 'typeorm'
export class ModifyChatMessage1693996694528 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "chat_message" ALTER COLUMN "sourceDocuments" TYPE TEXT`)
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "chat_message" ALTER COLUMN "sourceDocuments" TYPE VARCHAR`)
}
}
@@ -1,4 +1,5 @@
import { Init1693891895163 } from './1693891895163-Init' import { Init1693891895163 } from './1693891895163-Init'
import { ModifyChatFlow1693995626941 } from './1693995626941-ModifyChatFlow' import { ModifyChatFlow1693995626941 } from './1693995626941-ModifyChatFlow'
import { ModifyChatMessage1693996694528 } from './1693996694528-ModifyChatMessage'
export const postgresMigrations = [Init1693891895163, ModifyChatFlow1693995626941] export const postgresMigrations = [Init1693891895163, ModifyChatFlow1693995626941, ModifyChatMessage1693996694528]