Files
Flowise/packages/server/src/database/migrations/sqlite/1759424923093-AddChatFlowNameIndex.ts
T
Ilango ac252516f8 fix: migration errors for text to speech and chatflow name index (#5287)
* fix: add another migration to fix missing textToSpeech column

* fix: chatflow name index error

* fix: review
2025-10-03 10:57:16 +01:00

14 lines
525 B
TypeScript

import { MigrationInterface, QueryRunner } from 'typeorm'
export class AddChatFlowNameIndex1759424923093 implements MigrationInterface {
name = 'AddChatFlowNameIndex1759424923093'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_chatflow_name" ON "chat_flow" (substr(name, 1, 255))`)
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_chatflow_name"`)
}
}