[BUG] Broken migration AddFeedback1707213601923 with duplicate constraint "PK_98419043dd704f54-9830ab78f8"
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
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
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!
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
This is fixed but has not been published via docker yet.
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
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.
Don't use latest, use version 1.5.1 which solves the problem. If it's resolved, let me know here.