mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-27 13:00:35 +03:00
13 lines
571 B
TypeScript
13 lines
571 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
|
|
export class AddUsedToolsToChatMessage1699481607341 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
const columnExists = await queryRunner.hasColumn('chat_message', 'usedTools')
|
|
if (!columnExists) queryRunner.query(`ALTER TABLE \`chat_message\` ADD COLUMN \`usedTools\` TEXT;`)
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`chat_message\` DROP COLUMN \`usedTools\`;`)
|
|
}
|
|
}
|