You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/api/models
QuantumGhost 9565fe9b1b
fix(api): fix alembic offline mode (#19285)
Alembic's offline mode generates SQL from SQLAlchemy migration operations,
providing developers with a clear view of database schema changes without
requiring an active database connection.

However, some migration versions (specifically bbadea11becb and d7999dfa4aae)
were performing database schema introspection, which fails in offline mode
since it requires an actual database connection.

This commit:
- Adds offline mode support by detecting context.is_offline_mode()
- Skips introspection steps when in offline mode
- Adds warning messages in SQL output to inform users that assumptions were made
- Prompts users to review the generated SQL for accuracy

These changes ensure migrations work consistently in both online and offline modes.

Close #19284.
9 months ago
..
__init__.py chore: use TenantAccountRole instead of TenantAccountJoinRole (#15514) 11 months ago
account.py chore: use TenantAccountRole instead of TenantAccountJoinRole (#15514) 11 months ago
api_based_extension.py feat: mypy for all type check (#10921) 1 year ago
base.py Introduce Plugins (#13836) 12 months ago
dataset.py Fix Performance Issues: (#17083) 10 months ago
engine.py feat(api): Add image multimodal support for LLMNode (#17372) 9 months ago
enums.py chore: bump minimum supported Python version to 3.11 (#10386) 1 year ago
model.py feat(api): Add image multimodal support for LLMNode (#17372) 9 months ago
provider.py Introduce Plugins (#13836) 12 months ago
source.py Introduce Plugins (#13836) 12 months ago
task.py Introduce Plugins (#13836) 12 months ago
tools.py fix(api): fix alembic offline mode (#19285) 9 months ago
types.py chore(api/models): apply ruff reformatting (#7600) 1 year ago
web.py Introduce Plugins (#13836) 12 months ago
workflow.py chore: fix reimported (#18610) 10 months ago