Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Broken migration AddFeedback1707213601923 with duplicate constraint "PK_98419043dd704f54-9830ab78f8"

Open funbits-ci opened this issue 1 year ago • 8 comments

Describe the bug Migration AddFeedback1707213601923 in 1.6.1 is broken as it reuse the same constraint name PK_98419043dd704f54-9830ab78f8 that already exist on the variable table

To Reproduce Just upgrade to 1.6.1 and migration will fail

Expected behavior Migration should work

funbits-ci avatar Mar 13 '24 18:03 funbits-ci

using docker portainer in a new installation of flowise using version 1.6.1 I got the same problem related above: PK_98419043dd704f54-9830ab78f8 that already exists on the variable table I have the same stack working perfectly with the version 1.6.0 . after finding the problem I had to downgrade and now working well. In practice, this problem is impossible to create any flow or agent. Is impossible to create any credentials. nothing working

radamesbispo avatar Mar 13 '24 19:03 radamesbispo

Same problem here upgrading to 1.6.1 and all my flows stoped!

[flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — 2024-03-14 06:34:47 [ERROR]: ❌ [server]: Error during Data Source initialization: relation "PK_98419043dd704f54-9830ab78f8" already exists [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — QueryFailedError: relation "PK_98419043dd704f54-9830ab78f8" already exists [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — at PostgresQueryRunner.query (/usr/local/lib/node_modules/flowise/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — at async AddFeedback1707213601923.up (/usr/local/lib/node_modules/flowise/dist/database/migrations/postgres/1707213601923-AddFeedback.js:6:9) [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — at async MigrationExecutor.executePendingMigrations (/usr/local/lib/node_modules/flowise/node_modules/typeorm/migration/MigrationExecutor.js:225:17) [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — at async DataSource.runMigrations (/usr/local/lib/node_modules/flowise/node_modules/typeorm/data-source/DataSource.js:265:35) [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — at async /usr/local/lib/node_modules/flowise/dist/index.js:77:13 [flowise-c5444c446-w4c5n](https://app.cloud66.com/stacks/85645/live_logs#) — TypeError: Cannot read properties of undefined (reading 'componentNodes')

Helllp!

leandrosilvaferreira avatar Mar 14 '24 06:03 leandrosilvaferreira

After I updated FlowiseAI (Docker) from 1.6 to 1.6.1 I receive following errors:

2024-03-13 08:52:30.249 UTC [138] ERROR: relation "PK_98419043dd704f54-9830ab78f8" already exists

2024-03-13 08:52:30.249 UTC [138] STATEMENT:  CREATE TABLE IF NOT EXISTS chat_message_feedback (

	                id uuid NOT NULL DEFAULT uuid_generate_v4(),

	                "chatflowid" varchar NOT NULL,

	                "content" text,

	                "chatId" varchar NOT NULL,

	                "messageId" varchar NOT NULL,

	                "rating" varchar NOT NULL,

	                "createdDate" timestamp NOT NULL DEFAULT now(),

	                CONSTRAINT "PK_98419043dd704f54-9830ab78f8" PRIMARY KEY (id)

	            );

My current fix is to downgrade to Flowise 1.6

simplecloudbox avatar Mar 14 '24 09:03 simplecloudbox

This is fixed but has not been published via docker yet.

emrahtoy avatar Mar 14 '24 09:03 emrahtoy

Same issue on docker/portainer and 1.6.1. Assuming that means it's fixed but not in latest yet and we should wait till next release?

2024-03-14 18:35:45 [INFO]: ⚡️ [server]: Flowise Server is listening at 3000
2024-03-14 18:35:45 [INFO]: 📦 [server]: Data Source is being initialized!
Migration "AddFeedback1707213601923" failed, error: relation "PK_98419043dd704f54-9830ab78f8" already exists
2024-03-14 18:35:45 [ERROR]: ❌ [server]: Error during Data Source initialization: relation "PK_98419043dd704f54-9830ab78f8" already exists
QueryFailedError: relation "PK_98419043dd704f54-9830ab78f8" already exists
    at PostgresQueryRunner.query (/usr/local/lib/node_modules/flowise/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AddFeedback1707213601923.up (/usr/local/lib/node_modules/flowise/dist/database/migrations/postgres/1707213601923-AddFeedback.js:6:9)
    at async MigrationExecutor.executePendingMigrations (/usr/local/lib/node_modules/flowise/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/usr/local/lib/node_modules/flowise/node_modules/typeorm/data-source/DataSource.js:265:35)
    at async /usr/local/lib/node_modules/flowise/dist/index.js:77:13

kempec110 avatar Mar 16 '24 15:03 kempec110

Same issue here, 2024-03-16 17:34:16 [ERROR]: ❌ [server]: Error during Data Source initialization: relation "PK_98419043dd704f54-9830ab78f8" already exists is preventing me from using Postgres.

ml4den avatar Mar 16 '24 17:03 ml4den

Don't use latest, use version 1.5.1 which solves the problem. If it's resolved, let me know here.

Niltoncota avatar Mar 17 '24 21:03 Niltoncota

PR that was merged, will be pushing new release

Edit: released to v1.6.2

HenryHengZJ avatar Mar 18 '24 08:03 HenryHengZJ