postgresqldockerflowise

Flowise on Docker - PK errors when initializing database - Postgres


I'm using Flowise 1.6.1 on Docker with a Postgres 16.2 database also on Docker. When I run the Flowise container for the first time it starts but shows these errors regarding already existing PKs when initializing the database. The database is newly created so it is completely empty before the initialization process.

Here are the errors:

2024-03-14 13:43:09 [INFO]: ⚡️ [server]: Flowise Server is listening at 3033
2024-03-14 13:43:09 [INFO]: 📦 [server]: Data Source is being initialized!
Migration "AddFeedback1707213601923" failed, error: relation "PK_98419043dd704f54-9830ab78f8" already exists
2024-03-14 13:43:09 [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

What could be the problem?


Solution

  • There is problem with version 1.6.1 in the postgresql migration at this time. Solution is to use a previous version. I tried 1.6.0 and it worked fine.