1.4.0 update 1.7.2 Internal Server Error #16454

Closed
opened 2026-02-21 19:26:09 -05:00 by yindo · 10 comments
Owner

Originally created by @shengxianli on GitHub (Aug 26, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

cd docker
cp docker-compose.yaml docker-compose.yaml.$(date +%s).bak

git checkout main
git pull origin main

docker compose down

docker compose up -d
docker compose exec api uv run flask db upgrade
https://github.com/langgenius/dify/issues/23913

✔️ Expected Behavior

Internal Server Error

Actual Behavior

Internal Server Error

Originally created by @shengxianli on GitHub (Aug 26, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce cd docker cp docker-compose.yaml docker-compose.yaml.$(date +%s).bak git checkout main git pull origin main docker compose down docker compose up -d docker compose exec api uv run flask db upgrade https://github.com/langgenius/dify/issues/23913 ### ✔️ Expected Behavior Internal Server Error ### ❌ Actual Behavior Internal Server Error
yindo added the 🐞 bug🤔 cant-reproduceoutdated labels 2026-02-21 19:26:09 -05:00
yindo closed this issue 2026-02-21 19:26:10 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 26, 2025):

The Internal Server Error after upgrading from 1.4.0 to 1.7.2 is most likely caused by a missing database table called tenant_plugin_auto_upgrade_strategies, which is required for the plugin auto upgrade strategy feature introduced in 1.7.0. This table should be created by a database migration script, but if the migration was not applied (or was removed before being run), you’ll see SQL errors and Internal Server Errors when the app tries to access it source.

To fix this, run all pending database migrations inside your API container:

docker compose exec api uv run flask db upgrade

If you see errors like relation already exists or issues with the alembic_version table, you may need to stamp your database to the latest migration revision and then re-run the upgrade:

  1. Find the latest migration revision in api/migrations/versions/.
  2. Run:
    docker compose exec api uv run flask db stamp <latest_revision>
    docker compose exec api uv run flask db upgrade
    

Check your database to confirm the table now exists and restart your containers if needed. If the error persists, review the API container logs (docker compose logs api) for more details and ensure your codebase and .env file are fully updated and match the new version source.

No manual steps beyond running the migration commands are required; the migration script is self-contained and should work automatically if all migrations are up to date.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 26, 2025): <!-- Answer --> The Internal Server Error after upgrading from 1.4.0 to 1.7.2 is most likely caused by a missing database table called `tenant_plugin_auto_upgrade_strategies`, which is required for the plugin auto upgrade strategy feature introduced in 1.7.0. This table should be created by a database migration script, but if the migration was not applied (or was removed before being run), you’ll see SQL errors and Internal Server Errors when the app tries to access it [source](https://github.com/langgenius/dify/issues/23913). To fix this, run all pending database migrations inside your API container: ```bash docker compose exec api uv run flask db upgrade ``` If you see errors like `relation already exists` or issues with the `alembic_version` table, you may need to stamp your database to the latest migration revision and then re-run the upgrade: 1. Find the latest migration revision in `api/migrations/versions/`. 2. Run: ```bash docker compose exec api uv run flask db stamp <latest_revision> docker compose exec api uv run flask db upgrade ``` Check your database to confirm the table now exists and restart your containers if needed. If the error persists, review the API container logs (`docker compose logs api`) for more details and ensure your codebase and `.env` file are fully updated and match the new version [source](https://github.com/langgenius/dify/issues/22961). No manual steps beyond running the migration commands are required; the migration script is self-contained and should work automatically if all migrations are up to date. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/8f5fc4a3-ff6d-4339-bec2-e94e30145538?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8f5fc4a3-ff6d-4339-bec2-e94e30145538?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8f5fc4a3-ff6d-4339-bec2-e94e30145538?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8f5fc4a3-ff6d-4339-bec2-e94e30145538?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8f5fc4a3-ff6d-4339-bec2-e94e30145538?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8f5fc4a3-ff6d-4339-bec2-e94e30145538?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8f5fc4a3-ff6d-4339-bec2-e94e30145538?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/24567)
Author
Owner

@shengxianli commented on GitHub (Aug 26, 2025):

docker compose exec api uv run flask db upgrade

(myenv) root@li-tst2-1:/opt/cloudroot/dify/docker# docker compose exec api uv run flask db upgrade
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.

no relation already exists
/opt/cloudroot/dify/docker# docker logs docker-api-1 | grep -i "already exists"
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/entrypoint.sh: line 7: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[2025-08-26 08:51:07 +0000] [1] [INFO] Starting gunicorn 23.0.0
[2025-08-26 08:51:07 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
[2025-08-26 08:51:07 +0000] [1] [INFO] Using worker: gevent
[2025-08-26 08:51:07 +0000] [21] [INFO] Booting worker with pid: 21
Internal Server Error
@dosu

@shengxianli commented on GitHub (Aug 26, 2025): > docker compose exec api uv run flask db upgrade (myenv) root@li-tst2-1:/opt/cloudroot/dify/docker# docker compose exec api uv run flask db upgrade INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. no relation already exists /opt/cloudroot/dify/docker# docker logs docker-api-1 | grep -i "already exists" /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /entrypoint.sh: line 7: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) [2025-08-26 08:51:07 +0000] [1] [INFO] Starting gunicorn 23.0.0 [2025-08-26 08:51:07 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1) [2025-08-26 08:51:07 +0000] [1] [INFO] Using worker: gevent [2025-08-26 08:51:07 +0000] [21] [INFO] Booting worker with pid: 21 Internal Server Error [@dosu](https://go.dosu.dev/dosubot)
Author
Owner

@dosubot[bot] commented on GitHub (Aug 26, 2025):

Your Internal Server Error is almost certainly due to the missing tenant_plugin_auto_upgrade_strategies table, which should be created by the migration script 8bcc02c9bd07_add_tenant_plugin_autoupgrade_table.py as part of the upgrade to 1.7.x. However, in some upgrade paths, this migration script may be missing or skipped due to changes in the migration chain, especially if you upgraded across versions where migration dependencies were altered or scripts were removed source.

Here’s how to troubleshoot:

  1. Connect to your PostgreSQL database and run \dt to check if tenant_plugin_auto_upgrade_strategies exists.
  2. Check the api/migrations/versions/ directory in your codebase for 8bcc02c9bd07_add_tenant_plugin_autoupgrade_table.py. If it’s missing, your migration chain is broken and the table will not be created source.
  3. In your database, check the alembic_version table to see if revision 8bcc02c9bd07 is present.
  4. If the migration script is missing or not applied, restore it from the repo, then run:
    docker compose exec api uv run flask db stamp 375fe79ead14
    docker compose exec api uv run flask db upgrade
    
    This will force Alembic to recognize the correct migration chain and create the missing table source.

If the table exists but you still get errors, please share the full error traceback from docker compose logs api so we can pinpoint the next step.

Let me know what you find!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 26, 2025): <!-- Answer --> Your Internal Server Error is almost certainly due to the missing tenant_plugin_auto_upgrade_strategies table, which should be created by the migration script 8bcc02c9bd07_add_tenant_plugin_autoupgrade_table.py as part of the upgrade to 1.7.x. However, in some upgrade paths, this migration script may be missing or skipped due to changes in the migration chain, especially if you upgraded across versions where migration dependencies were altered or scripts were removed [source](https://github.com/langgenius/dify/pull/22731). Here’s how to troubleshoot: 1. Connect to your PostgreSQL database and run \dt to check if tenant_plugin_auto_upgrade_strategies exists. 2. Check the api/migrations/versions/ directory in your codebase for 8bcc02c9bd07_add_tenant_plugin_autoupgrade_table.py. If it’s missing, your migration chain is broken and the table will not be created [source](https://github.com/langgenius/dify/pull/22731). 3. In your database, check the alembic_version table to see if revision 8bcc02c9bd07 is present. 4. If the migration script is missing or not applied, restore it from the repo, then run: ``` docker compose exec api uv run flask db stamp 375fe79ead14 docker compose exec api uv run flask db upgrade ``` This will force Alembic to recognize the correct migration chain and create the missing table [source](https://github.com/langgenius/dify/issues/23913). If the table exists but you still get errors, please share the full error traceback from docker compose logs api so we can pinpoint the next step. Let me know what you find! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/028a8c30-3db1-4671-ac5a-8c4b255def6f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/028a8c30-3db1-4671-ac5a-8c4b255def6f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/028a8c30-3db1-4671-ac5a-8c4b255def6f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/028a8c30-3db1-4671-ac5a-8c4b255def6f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/028a8c30-3db1-4671-ac5a-8c4b255def6f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/028a8c30-3db1-4671-ac5a-8c4b255def6f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/028a8c30-3db1-4671-ac5a-8c4b255def6f?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/24567)
Author
Owner

@shengxianli commented on GitHub (Aug 28, 2025):

docker compose exec api uv run flask db upgrade

root@li-tst2-1:/opt/cloudroot/dify/docker# docker compose exec api uv run flask db stamp 375fe79ead14
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running stamp_revision 2adcbe1f5dfb -> 375fe79ead14
root@li-tst2-1:/opt/cloudroot/dify/docker# docker compose exec api uv run flask db upgrade
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 375fe79ead14 -> 8bcc02c9bd07, add_tenant_plugin_autoupgrade_table
INFO [alembic.runtime.migration] Running upgrade 8bcc02c9bd07 -> 532b3f888abf, manual dataset field update
INFO [alembic.runtime.migration] Running upgrade 532b3f888abf -> fa8b0fa6f407, add timeout for tool_mcp_providers
Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "tool_mcp_providers" does not exist

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/app/api/.venv/bin/flask", line 10, in
sys.exit(main())
^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 1131, in main
cli.main()
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 400, in decorator
return ctx.invoke(f, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/cli.py", line 154, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 111, in wrapped
f(*args, **kwargs)
File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 200, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/app/api/.venv/lib/python3.12/site-packages/alembic/command.py", line 483, in upgrade
script.run_env()
File "/app/api/.venv/lib/python3.12/site-packages/alembic/script/base.py", line 551, in run_env
util.load_python_file(self.dir, "env.py")
File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 116, in load_python_file
module = load_module_py(module_id, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 136, in load_module_py
spec.loader.exec_module(module) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "/app/api/migrations/env.py", line 109, in
run_migrations_online()
File "/app/api/migrations/env.py", line 103, in run_migrations_online
context.run_migrations()
File "", line 8, in run_migrations
File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/environment.py", line 946, in run_migrations
self.get_context().run_migrations(**kw)
File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/migration.py", line 627, in run_migrations
step.migration_fn(**kw)
File "/app/api/migrations/versions/2025_08_07_1115-fa8b0fa6f407_add_timeout_for_tool_mcp_providers.py", line 21, in upgrade
with op.batch_alter_table('tool_mcp_providers', schema=None) as batch_op:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 144, in exit
next(self.gen)
File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/base.py", line 397, in batch_alter_table
impl.flush()
File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/batch.py", line 115, in flush
fn(*arg, **kw)
File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 378, in add_column
self._exec(
File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 246, in _exec
return conn.execute(construct, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1415, in execute
return meth(
^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 187, in _execute_on_connection
return connection._execute_ddl(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1526, in _execute_ddl
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1842, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1982, in _exec_single_context
self._handle_dbapi_exception(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2351, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "tool_mcp_providers" does not exist

[SQL: ALTER TABLE tool_mcp_providers ADD COLUMN timeout FLOAT DEFAULT 30 NOT NULL]
(Background on this error at: https://sqlalche.me/e/20/f405)
@dosu

@shengxianli commented on GitHub (Aug 28, 2025): > ``` > docker compose exec api uv run flask db upgrade > ``` root@li-tst2-1:/opt/cloudroot/dify/docker# docker compose exec api uv run flask db stamp 375fe79ead14 INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running stamp_revision 2adcbe1f5dfb -> 375fe79ead14 root@li-tst2-1:/opt/cloudroot/dify/docker# docker compose exec api uv run flask db upgrade INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running upgrade 375fe79ead14 -> 8bcc02c9bd07, add_tenant_plugin_autoupgrade_table INFO [alembic.runtime.migration] Running upgrade 8bcc02c9bd07 -> 532b3f888abf, manual dataset field update INFO [alembic.runtime.migration] Running upgrade 532b3f888abf -> fa8b0fa6f407, add timeout for tool_mcp_providers Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context self.dialect.do_execute( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UndefinedTable: relation "tool_mcp_providers" does not exist The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/api/.venv/bin/flask", line 10, in <module> sys.exit(main()) ^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 1131, in main cli.main() File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1363, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1226, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke return callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func return f(get_current_context(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 400, in decorator return ctx.invoke(f, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke return callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/cli.py", line 154, in upgrade _upgrade(directory, revision, sql, tag, x_arg) File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 111, in wrapped f(*args, **kwargs) File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 200, in upgrade command.upgrade(config, revision, sql=sql, tag=tag) File "/app/api/.venv/lib/python3.12/site-packages/alembic/command.py", line 483, in upgrade script.run_env() File "/app/api/.venv/lib/python3.12/site-packages/alembic/script/base.py", line 551, in run_env util.load_python_file(self.dir, "env.py") File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 116, in load_python_file module = load_module_py(module_id, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 136, in load_module_py spec.loader.exec_module(module) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap_external>", line 999, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/app/api/migrations/env.py", line 109, in <module> run_migrations_online() File "/app/api/migrations/env.py", line 103, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/environment.py", line 946, in run_migrations self.get_context().run_migrations(**kw) File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/migration.py", line 627, in run_migrations step.migration_fn(**kw) File "/app/api/migrations/versions/2025_08_07_1115-fa8b0fa6f407_add_timeout_for_tool_mcp_providers.py", line 21, in upgrade with op.batch_alter_table('tool_mcp_providers', schema=None) as batch_op: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/contextlib.py", line 144, in __exit__ next(self.gen) File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/base.py", line 397, in batch_alter_table impl.flush() File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/batch.py", line 115, in flush fn(*arg, **kw) File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 378, in add_column self._exec( File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 246, in _exec return conn.execute(construct, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1415, in execute return meth( ^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 187, in _execute_on_connection return connection._execute_ddl( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1526, in _execute_ddl ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1842, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1982, in _exec_single_context self._handle_dbapi_exception( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2351, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context self.dialect.do_execute( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "tool_mcp_providers" does not exist [SQL: ALTER TABLE tool_mcp_providers ADD COLUMN timeout FLOAT DEFAULT 30 NOT NULL] (Background on this error at: https://sqlalche.me/e/20/f405) [@dosu](https://go.dosu.dev/dosubot)
Author
Owner

@joenzx commented on GitHub (Sep 3, 2025):

The same error
api uv run flask db stamp 375fe79ead14
uv run flask db upgrade
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "tool_mcp_providers" does not exist

@joenzx commented on GitHub (Sep 3, 2025): The same error api uv run flask db stamp 375fe79ead14 uv run flask db upgrade sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "tool_mcp_providers" does not exist
Author
Owner

@joenzx commented on GitHub (Sep 4, 2025):

@shengxianli Have you solved this problem??

@joenzx commented on GitHub (Sep 4, 2025): @shengxianli Have you solved this problem??
Author
Owner

@shengxianli commented on GitHub (Sep 4, 2025):

@shengxianli 您解决这个问题了吗??

no gave up

@shengxianli commented on GitHub (Sep 4, 2025): > [@shengxianli](https://github.com/shengxianli) 您解决这个问题了吗?? no gave up
Author
Owner

@joenzx commented on GitHub (Sep 4, 2025):

@shengxianli 您解决这个问题了吗??

no gave up

Refer to this: https://github.com/langgenius/dify/issues/22244
I manually created these tables and then upgraded them. The following error was reported

root@dify-api-0:/app/api# uv run flask db stamp 375fe79ead14
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running stamp_revision 8bcc02c9bd07 -> 375fe79ead14
root@dify-api-0:/app/api# uv run flask db upgrade
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 375fe79ead14 -> 8bcc02c9bd07, add_tenant_plugin_autoupgrade_table
INFO [alembic.runtime.migration] Running upgrade 8bcc02c9bd07 -> 532b3f888abf, manual dataset field update
INFO [alembic.runtime.migration] Running upgrade 532b3f888abf -> fa8b0fa6f407, add timeout for tool_mcp_providers
INFO [alembic.runtime.migration] Running upgrade fa8b0fa6f407 -> e8446f481c1e, Add provider multi credential support
Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UndefinedFunction: function uuidv7() does not exist
LINE 3: id UUID DEFAULT uuidv7() NOT NULL,
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/app/api/.venv/bin/flask", line 10, in
sys.exit(main())
^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 1131, in main
cli.main()
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 400, in decorator
return ctx.invoke(f, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/cli.py", line 154, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 111, in wrapped
f(*args, **kwargs)
File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 200, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/app/api/.venv/lib/python3.12/site-packages/alembic/command.py", line 483, in upgrade
script.run_env()
File "/app/api/.venv/lib/python3.12/site-packages/alembic/script/base.py", line 551, in run_env
util.load_python_file(self.dir, "env.py")
File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 116, in load_python_file
module = load_module_py(module_id, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 136, in load_module_py
spec.loader.exec_module(module) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "/app/api/migrations/env.py", line 109, in
run_migrations_online()
File "/app/api/migrations/env.py", line 103, in run_migrations_online
context.run_migrations()
File "", line 8, in run_migrations
File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/environment.py", line 946, in run_migrations
self.get_context().run_migrations(**kw)
File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/migration.py", line 627, in run_migrations
step.migration_fn(**kw)
File "/app/api/migrations/versions/2025_08_09_1553-e8446f481c1e_add_provider_credential_pool_support.py", line 23, in upgrade
op.create_table('provider_credentials',
File "", line 8, in create_table
File "", line 3, in create_table
File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/ops.py", line 1332, in create_table
return operations.invoke(op)
^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/base.py", line 441, in invoke
return fn(self, operation)
^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/toimpl.py", line 135, in create_table
operations.impl.create_table(table, **kw)
File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 423, in create_table
self._exec(schema.CreateTable(table, **kw))
File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 246, in _exec
return conn.execute(construct, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1415, in execute
return meth(
^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 187, in _execute_on_connection
return connection._execute_ddl(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1526, in _execute_ddl
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1842, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1982, in _exec_single_context
self._handle_dbapi_exception(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2351, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) function uuidv7() does not exist
LINE 3: id UUID DEFAULT uuidv7() NOT NULL,
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

[SQL:
CREATE TABLE provider_credentials (
id UUID DEFAULT uuidv7() NOT NULL,
tenant_id UUID NOT NULL,
provider_name VARCHAR(255) NOT NULL,
credential_name VARCHAR(255) NOT NULL,
encrypted_config TEXT NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
CONSTRAINT provider_credential_pkey PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/20/f405)

@joenzx commented on GitHub (Sep 4, 2025): > > [@shengxianli](https://github.com/shengxianli) 您解决这个问题了吗?? > > no gave up Refer to this: https://github.com/langgenius/dify/issues/22244 I manually created these tables and then upgraded them. The following error was reported root@dify-api-0:/app/api# uv run flask db stamp 375fe79ead14 INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running stamp_revision 8bcc02c9bd07 -> 375fe79ead14 root@dify-api-0:/app/api# uv run flask db upgrade INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running upgrade 375fe79ead14 -> 8bcc02c9bd07, add_tenant_plugin_autoupgrade_table INFO [alembic.runtime.migration] Running upgrade 8bcc02c9bd07 -> 532b3f888abf, manual dataset field update INFO [alembic.runtime.migration] Running upgrade 532b3f888abf -> fa8b0fa6f407, add timeout for tool_mcp_providers INFO [alembic.runtime.migration] Running upgrade fa8b0fa6f407 -> e8446f481c1e, Add provider multi credential support Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context self.dialect.do_execute( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UndefinedFunction: function uuidv7() does not exist LINE 3: id UUID DEFAULT uuidv7() NOT NULL, ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/api/.venv/bin/flask", line 10, in <module> sys.exit(main()) ^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 1131, in main cli.main() File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1363, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1226, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke return callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func return f(get_current_context(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 400, in decorator return ctx.invoke(f, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 794, in invoke return callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/cli.py", line 154, in upgrade _upgrade(directory, revision, sql, tag, x_arg) File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 111, in wrapped f(*args, **kwargs) File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 200, in upgrade command.upgrade(config, revision, sql=sql, tag=tag) File "/app/api/.venv/lib/python3.12/site-packages/alembic/command.py", line 483, in upgrade script.run_env() File "/app/api/.venv/lib/python3.12/site-packages/alembic/script/base.py", line 551, in run_env util.load_python_file(self.dir, "env.py") File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 116, in load_python_file module = load_module_py(module_id, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 136, in load_module_py spec.loader.exec_module(module) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap_external>", line 999, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/app/api/migrations/env.py", line 109, in <module> run_migrations_online() File "/app/api/migrations/env.py", line 103, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/environment.py", line 946, in run_migrations self.get_context().run_migrations(**kw) File "/app/api/.venv/lib/python3.12/site-packages/alembic/runtime/migration.py", line 627, in run_migrations step.migration_fn(**kw) File "/app/api/migrations/versions/2025_08_09_1553-e8446f481c1e_add_provider_credential_pool_support.py", line 23, in upgrade op.create_table('provider_credentials', File "<string>", line 8, in create_table File "<string>", line 3, in create_table File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/ops.py", line 1332, in create_table return operations.invoke(op) ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/base.py", line 441, in invoke return fn(self, operation) ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/alembic/operations/toimpl.py", line 135, in create_table operations.impl.create_table(table, **kw) File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 423, in create_table self._exec(schema.CreateTable(table, **kw)) File "/app/api/.venv/lib/python3.12/site-packages/alembic/ddl/impl.py", line 246, in _exec return conn.execute(construct, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1415, in execute return meth( ^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 187, in _execute_on_connection return connection._execute_ddl( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1526, in _execute_ddl ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1842, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1982, in _exec_single_context self._handle_dbapi_exception( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2351, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context self.dialect.do_execute( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 943, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) function uuidv7() does not exist LINE 3: id UUID DEFAULT uuidv7() NOT NULL, ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. [SQL: CREATE TABLE provider_credentials ( id UUID DEFAULT uuidv7() NOT NULL, tenant_id UUID NOT NULL, provider_name VARCHAR(255) NOT NULL, credential_name VARCHAR(255) NOT NULL, encrypted_config TEXT NOT NULL, created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT provider_credential_pkey PRIMARY KEY (id) ) ] (Background on this error at: https://sqlalche.me/e/20/f405)
Author
Owner

@joenzx commented on GitHub (Sep 4, 2025):

@shengxianli My problem has been solved. This is still an issue during the database migration process. You need to check the database update records to see what you are lacking. Then set this version to the corresponding record version number and upgrade

@joenzx commented on GitHub (Sep 4, 2025): @shengxianli My problem has been solved. This is still an issue during the database migration process. You need to check the database update records to see what you are lacking. Then set this version to the corresponding record version number and upgrade
Author
Owner

@shengxianli commented on GitHub (Sep 4, 2025):

@shengxianli 我的问题已经解决了。这仍然是数据库迁移过程中的问题。您需要检查数据库更新记录,看看缺少什么。然后将此版本设置为相应的记录版本号并升级。

Thank you very much. I'll give it a try.

@shengxianli commented on GitHub (Sep 4, 2025): > [@shengxianli](https://github.com/shengxianli) 我的问题已经解决了。这仍然是数据库迁移过程中的问题。您需要检查数据库更新记录,看看缺少什么。然后将此版本设置为相应的记录版本号并升级。 Thank you very much. I'll give it a try.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#16454