mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
add sqlite modify credential
This commit is contained in:
@@ -13,7 +13,7 @@ export class Credential implements ICredential {
|
||||
@Column()
|
||||
credentialName: string
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'text' })
|
||||
encryptedData: string
|
||||
|
||||
@CreateDateColumn()
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class ModifyCredential1693923551694 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "temp_credential" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar NOT NULL, "credentialName" varchar NOT NULL, "encryptedData" text NOT NULL, "createdDate" datetime NOT NULL DEFAULT (datetime('now')), "updatedDate" datetime NOT NULL DEFAULT (datetime('now')));`
|
||||
)
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "temp_credential" ("id", "name", "credentialName", "encryptedData", "createdDate", "updatedDate") SELECT "id", "name", "credentialName", "encryptedData", "createdDate", "updatedDate" FROM "credential";`
|
||||
)
|
||||
await queryRunner.query(`DROP TABLE credential;`)
|
||||
await queryRunner.query(`ALTER TABLE temp_credential RENAME TO credential;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP TABLE credential`)
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
import { Init1693835579790 } from './1693835579790-Init'
|
||||
import { ModifyChatFlow1693920824108 } from './1693920824108-ModifyChatFlow'
|
||||
import { ModifyChatMessage1693921865247 } from './1693921865247-ModifyChatMessage'
|
||||
import { ModifyCredential1693923551694 } from './1693923551694-ModifyCredential'
|
||||
|
||||
export const sqliteMigrations = [Init1693835579790, ModifyChatFlow1693920824108, ModifyChatMessage1693921865247]
|
||||
export const sqliteMigrations = [
|
||||
Init1693835579790,
|
||||
ModifyChatFlow1693920824108,
|
||||
ModifyChatMessage1693921865247,
|
||||
ModifyCredential1693923551694
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user