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/migrations/versions
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.
1 year ago
..
00bacef91f18_rename_api_provider_description.py
2a3aebbbf4bb_add_app_tracing.py
2beac44e5f5f_add_is_universal_in_apps.py
2c8af9671032_add_qa_document_language.py
2e9819ca5b28_add_tenant_id_in_api_token.py
3b18fea55204_add_tool_label_bings.py
3c7cac9521c6_add_tags_and_binding_table.py
3ef9b2b6bee6_add_assistant_app.py
03f98355ba0e_add_workflow_tool_label_and_tool_.py
4bcffcd64aa4_update_dataset_model_field_null_.py
04c602f5dc9b_update_appmodelconfig_and_add_table_.py
4e99a8df00ff_add_load_balancing.py
4ff534e1eb11_add_workflow_to_site.py
5fda94355fce_custom_disclaimer.py
6dcb43972bdc_add_dataset_retriever_resource.py
6e2cfb077b04_add_dataset_collection_binding.py
6e957a32015b_add_embedding_cache_created_at_index.py
7b45942e39bb_add_api_key_auth_binding.py
7bdef072e63a_add_workflow_tool.py
7ce5a52e4eee_add_tool_providers.py
7e6a8693e07a_add_table_dataset_permissions.py
8ae9bc661daa_add_tool_conversation_variables_idx.py
8d2d099ceb74_add_qa_model_support.py
8e5588e6412e_add_environment_variable_to_workflow_.py
8ec536f3c800_rename_api_provider_credentails.py
8fe468ba0ca5_add_gpt4v_supports.py improve: introduce isort for linting Python imports (#1983) 2 years ago
9e98fbaffb88_add_workflow_tool_version.py
9f4e3427ea84_add_created_by_role.py
9fafbd60eca1_add_message_file_belongs_to.py
16fa53d9faec_add_provider_model_support.py
17b5ab037c40_add_keyworg_table_storage_type.py
23db93619b9d_add_message_files_into_agent_thought.py
42e85ed5564d_conversation_columns_set_nullable.py
47cc7df8c4f3_modify_default_model_name_length.py
53bf8af60645_update_model.py
053da0c1d756_add_api_tool_privacy.py
63f9175e515b_merge_branches.py
64a70a7aab8b_add_workflow_run_index.py
64b051264f32_init.py Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 1 year ago
77e83833755c_add_app_config_retriever_resource.py
89c7899ca936_.py
114eed84c228_remove_tool_id_from_model_invoke.py
161cadc1af8d_add_dataset_permission_tenant_id.py
246ba09cbbdb_add_app_anntation_setting.py
380c6aa5a70d_add_tool_labels_to_agent_thought.py
563cf8bf777b_enable_tool_file_without_conversation_id.py
614f77cecc48_add_last_active_at.py
675b5321501b_add_node_execution_id_into_node_.py
714aafe25d39_add_anntation_history_match_response.py
853f9b9cd3b6_add_message_price_unit.py
968fff4c0ab9_add_api_based_extension.py
2024_08_09_0801-1787fbae959a_update_tools_original_url_length.py
2024_08_13_0633-63a83fcf12ba_support_conversation_variables.py
2024_08_14_1354-8782057ff0dc_add_conversations_dialogue_count.py
2024_08_15_0956-0251a1c768cc_add_tidb_auth_binding.py
2024_08_15_1001-a6be81136580_app_and_site_icon_type.py
2024_08_20_0455-2dbe42621d96_rename_workflow__conversation_variables_.py
2024_08_25_0441-d0187d6a88dd_add_created_by_and_updated_by_to_app_.py
2024_09_01_1255-030f4915f36a_add_use_icon_as_answer_icon_fields_for_.py
2024_09_11_1012-d57ba9ebb251_add_parent_message_id_to_messages.py
2024_09_24_0922-6af6a521a53e_update_retrieval_resource.py
2024_09_25_0434-33f5fac87f29_external_knowledge_api.py
2024_09_29_0835-ddcc8bbef391_increase_max_length_of_builtin_tool_provider.py
2024_10_09_1329-d8e744d88ed6_fix_wrong_service_api_history.py
2024_10_10_0516-bbadea11becb_add_name_and_size_to_tool_files.py fix(api): fix alembic offline mode (#19285) 1 year ago
2024_10_22_0959-43fa78bc3b7d_add_white_list.py
2024_10_28_0720-08ec4f75af5e_add_tenant_plugin_permisisons.py
2024_11_01_0434-d3f6769a94a3_add_upload_files_source_url.py
2024_11_01_0449-93ad8c19c40b_rename_conversation_variables_index_name.py
2024_11_01_0540-f4d7ce70a7ca_update_upload_files_source_url.py
2024_11_01_0622-d07474999927_update_type_of_custom_disclaimer_to_text.py
2024_11_01_0623-09a8d1878d9b_update_workflows_graph_features_and_.py
2024_11_12_0925-01d6889832f7_add_created_at_index_for_messages.py
2024_11_22_0701-e19037032219_parent_child_index.py
2024_11_28_0553-cf8f4fc45278_add_exceptions_count_field_to_.py
2024_12_19_1746-11b07f66c737_remove_unused_tool_providers.py
2024_12_20_0628-e1944c35e15e_add_retry_index_field_to_node_execution_.py Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 1 year ago
2024_12_23_1154-d7999dfa4aae_remove_workflow_node_executions_retry_.py fix(api): fix alembic offline mode (#19285) 1 year ago
2024_12_25_1137-923752d42eb6_add_auto_disabled_dataset_logs.py
2025_01_01_2000-a91b476a53de_change_workflow_runs_total_tokens_to_.py
2025_01_14_0617-f051706725cc_add_rate_limit_logs.py
2025_02_27_0917-d20049ed0af6_add_metadata_function.py
2025_03_03_0304-4413929e1ec2_extend_provider_name_column.py
2025_03_03_1436-ee79d9b1c156_add_marked_name_and_marked_comment_in_.py
2025_03_07_0315-5511c782ee4c_extend_provider_column.py
2025_03_29_2227-6a9f914f656c_change_documentsegment_and_childchunk_.py
4823da1d26cf_add_tool_file.py
4829e54d2fee_change_message_chain_id_to_nullable.py
16830a790f0f_.py
46976cc39132_add_annotation_histoiry_score.py
88072f0caa04_add_custom_config_in_tenant.py
187385f442fc_modify_provider_model_name_length.py
408176b91ad3_add_max_active_requests.py
5022897aaceb_add_model_name_in_embedding.py
a5b56fb053ef_app_config_add_speech_to_text.py
a8d7385a7b66_add_embeddings_provider_name.py
a8f9b3c45e4a_add_tenant_id_db_index.py
a45f4dfde53b_add_language_to_recommend_apps.py
a9836e3baeee_add_external_data_tools_in_app_model_.py
ab23c11305d4_add_dataset_query_variable_at_app_model_.py
ad472b61a054_add_api_provider_icon.py
b3a09c049e8e_add_advanced_prompt_templates.py
b24be59fbb04_.py
b69ca54b9208_add_chatbot_color_theme.py
b289e2408ee2_add_workflow.py
b2602e131636_add_workflow_run_id_index_for_message.py
b5429b71023c_messages_columns_set_nullable.py
bf0aec5ba2cf_add_provider_order.py
c031d46af369_remove_app_model_config_trace_config_.py
c3311b089690_add_tool_meta.py
c71211c8f604_add_tool_invoke_model_log.py
cc04d0998d4d_set_model_config_column_nullable.py FEAT: NEW WORKFLOW ENGINE (#3160) 2 years ago
d3d503a3471c_add_is_deleted_to_conversations.py
de95f5c77138_migration_serpapi_api_key.py Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 1 year ago
dfb3b7f477da_add_tool_index.py
e2eacc9a1b63_add_status_for_message.py
e32f6ccb87c6_e08af0a69ccefbb59fa80c778efee300bb780980.py
e35ed59becda_modify_quota_limit_field_type.py
e1901f623fd0_add_annotation_reply.py
e8883b0148c9_add_dataset_model_name.py
eeb2e349e6ac_increase_max_model_name_length.py
f2a6fc85e260_add_anntation_history_message_id.py
f9107f83abab_add_desc_for_apps.py
f25003750af4_add_created_updated_at.py
fca025d3b60f_add_dataset_retrival_model.py
fecff1c3da27_remove_extra_tracing_app_config_table .py