mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
add sqlite modify chatflow
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class ModifyChatFlow1693920824108 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "temp_chat_flow" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar NOT NULL, "flowData" text NOT NULL, "deployed" boolean, "isPublic" boolean, "apikeyid" varchar, "chatbotConfig" text, "createdDate" datetime NOT NULL DEFAULT (datetime('now')), "updatedDate" datetime NOT NULL DEFAULT (datetime('now')));`
|
||||
)
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "temp_chat_flow" ("id", "name", "flowData", "deployed", "isPublic", "apikeyid", "chatbotConfig", "createdDate", "updatedDate") SELECT "id", "name", "flowData", "deployed", "isPublic", "apikeyid", "chatbotConfig", "createdDate", "updatedDate" FROM "chat_flow";`
|
||||
)
|
||||
await queryRunner.query(`DROP TABLE chat_flow;`)
|
||||
await queryRunner.query(`ALTER TABLE temp_chat_flow RENAME TO chat_flow;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP TABLE temp_chat_flow`)
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Init1693835579790 } from './1693835579790-Init'
|
||||
import { ModifyChatFlow1693920824108 } from './1693920824108-ModifyChatFlow'
|
||||
|
||||
export const sqliteMigrations = [Init1693835579790]
|
||||
export const sqliteMigrations = [Init1693835579790, ModifyChatFlow1693920824108]
|
||||
|
||||
Reference in New Issue
Block a user