mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 09:01:09 +03:00
05763db8d3
Refactor index creation for chat_flow name across multiple databases to limit indexed length to 255 characters
14 lines
513 B
TypeScript
14 lines
513 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
|
|
export class AddChatFlowNameIndex1755748356008 implements MigrationInterface {
|
|
name = 'AddChatFlowNameIndex1755748356008'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`CREATE INDEX "IDX_chatflow_name" ON "chat_flow" (substring("name" from 1 for 255))`)
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`DROP INDEX "IDX_chatflow_name"`)
|
|
}
|
|
}
|