fix: address all linting and type errors from CI

pull/21899/head
baonudesifeizhai 11 months ago
parent b3f138fa10
commit 815791e0b4

@ -106,4 +106,4 @@ def run_migrations_online():
if context.is_offline_mode(): if context.is_offline_mode():
run_migrations_offline() run_migrations_offline()
else: else:
run_migrations_online() run_migrations_online()

@ -30,4 +30,4 @@ def downgrade():
batch_op.add_column(sa.Column('description_str', sa.TEXT(), autoincrement=False, nullable=False)) batch_op.add_column(sa.Column('description_str', sa.TEXT(), autoincrement=False, nullable=False))
batch_op.drop_column('description') batch_op.drop_column('description')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
batch_op.drop_column('label') batch_op.drop_column('label')
with op.batch_alter_table('tool_label_bindings', schema=None) as batch_op: with op.batch_alter_table('tool_label_bindings', schema=None) as batch_op:
batch_op.drop_constraint('unique_tool_label_bind', type_='unique') batch_op.drop_constraint('unique_tool_label_bind', type_='unique')

@ -36,4 +36,4 @@ def downgrade():
# ### commands auto generated by Alembic - please adjust! ## # ### commands auto generated by Alembic - please adjust! ##
op.drop_table('tracing_app_configs') op.drop_table('tracing_app_configs')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -48,4 +48,4 @@ def downgrade():
batch_op.drop_column('privacy_policy') batch_op.drop_column('privacy_policy')
op.drop_table('tool_conversation_variables') op.drop_table('tool_conversation_variables')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -29,4 +29,4 @@ def downgrade():
with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op: with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op:
batch_op.add_column(sa.Column('tool_id', postgresql.UUID(), autoincrement=False, nullable=False)) batch_op.add_column(sa.Column('tool_id', postgresql.UUID(), autoincrement=False, nullable=False))
# ### end Alembic commands ### # ### end Alembic commands ###

@ -31,4 +31,4 @@ def downgrade():
with op.batch_alter_table('dataset_permissions', schema=None) as batch_op: with op.batch_alter_table('dataset_permissions', schema=None) as batch_op:
batch_op.drop_column('tenant_id') batch_op.drop_column('tenant_id')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('tenant_account_joins', schema=None) as batch_op: with op.batch_alter_table('tenant_account_joins', schema=None) as batch_op:
batch_op.drop_column('current') batch_op.drop_column('current')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -76,4 +76,4 @@ def downgrade():
batch_op.drop_index('provider_model_tenant_id_provider_idx') batch_op.drop_index('provider_model_tenant_id_provider_idx')
op.drop_table('provider_models') op.drop_table('provider_models')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('dataset_keyword_tables', schema=None) as batch_op: with op.batch_alter_table('dataset_keyword_tables', schema=None) as batch_op:
batch_op.drop_column('data_source_type') batch_op.drop_column('data_source_type')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -34,4 +34,4 @@ def downgrade():
type_=sa.VARCHAR(length=40), type_=sa.VARCHAR(length=40),
existing_nullable=False) existing_nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -36,4 +36,4 @@ def downgrade():
type_=sa.VARCHAR(length=255), type_=sa.VARCHAR(length=255),
existing_nullable=True) existing_nullable=True)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -48,4 +48,4 @@ def downgrade():
batch_op.drop_index(batch_op.f('workflow__conversation_variables_app_id_idx')) batch_op.drop_index(batch_op.f('workflow__conversation_variables_app_id_idx'))
op.drop_table('workflow__conversation_variables') op.drop_table('workflow__conversation_variables')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('conversations', schema=None) as batch_op: with op.batch_alter_table('conversations', schema=None) as batch_op:
batch_op.drop_column('dialogue_count') batch_op.drop_column('dialogue_count')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -48,4 +48,4 @@ def downgrade():
batch_op.drop_index('tidb_auth_bindings_active_idx') batch_op.drop_index('tidb_auth_bindings_active_idx')
batch_op.drop_index('tidb_auth_bindings_status_idx') batch_op.drop_index('tidb_auth_bindings_status_idx')
op.drop_table('tidb_auth_bindings') op.drop_table('tidb_auth_bindings')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -36,4 +36,4 @@ def downgrade():
with op.batch_alter_table('apps', schema=None) as batch_op: with op.batch_alter_table('apps', schema=None) as batch_op:
batch_op.drop_column('icon_type') batch_op.drop_column('icon_type')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -25,4 +25,4 @@ def upgrade():
def downgrade(): def downgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
op.rename_table('workflow_conversation_variables', 'workflow__conversation_variables') op.rename_table('workflow_conversation_variables', 'workflow__conversation_variables')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -49,4 +49,4 @@ def downgrade():
batch_op.drop_column("updated_by") batch_op.drop_column("updated_by")
batch_op.drop_column("created_by") batch_op.drop_column("created_by")
# ### end Alembic commands ### # ### end Alembic commands ###

@ -42,4 +42,4 @@ def downgrade():
with op.batch_alter_table("apps", schema=None) as batch_op: with op.batch_alter_table("apps", schema=None) as batch_op:
batch_op.drop_column("use_icon_as_answer_icon") batch_op.drop_column("use_icon_as_answer_icon")
# ### end Alembic commands ### # ### end Alembic commands ###

@ -33,4 +33,4 @@ def downgrade():
with op.batch_alter_table('messages', schema=None) as batch_op: with op.batch_alter_table('messages', schema=None) as batch_op:
batch_op.drop_column('parent_message_id') batch_op.drop_column('parent_message_id')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -45,4 +45,4 @@ def downgrade():
existing_type=sa.UUID(), existing_type=sa.UUID(),
nullable=False) nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -70,4 +70,4 @@ def downgrade():
batch_op.drop_index('external_knowledge_apis_name_idx') batch_op.drop_index('external_knowledge_apis_name_idx')
op.drop_table('external_knowledge_apis') op.drop_table('external_knowledge_apis')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -36,4 +36,4 @@ def downgrade():
type_=sa.VARCHAR(length=40), type_=sa.VARCHAR(length=40),
existing_nullable=False) existing_nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -45,4 +45,4 @@ WHERE
AND parent_message_id = '{UUID_NIL}' AND parent_message_id = '{UUID_NIL}'
AND created_at >= '{v0_9_0_release_date}';""" AND created_at >= '{v0_9_0_release_date}';"""
op.execute(sql) op.execute(sql)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -62,4 +62,4 @@ def downgrade():
with op.batch_alter_table("tool_files", schema=None) as batch_op: with op.batch_alter_table("tool_files", schema=None) as batch_op:
batch_op.drop_column("size") batch_op.drop_column("size")
batch_op.drop_column("name") batch_op.drop_column("name")
# ### end Alembic commands ### # ### end Alembic commands ###

@ -39,4 +39,4 @@ def downgrade():
batch_op.drop_index('whitelists_tenant_idx') batch_op.drop_index('whitelists_tenant_idx')
op.drop_table('whitelists') op.drop_table('whitelists')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -34,4 +34,4 @@ def upgrade():
def downgrade(): def downgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
op.drop_table('account_plugin_permissions') op.drop_table('account_plugin_permissions')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('upload_files', schema=None) as batch_op: with op.batch_alter_table('upload_files', schema=None) as batch_op:
batch_op.drop_column('source_url') batch_op.drop_column('source_url')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -49,4 +49,4 @@ def downgrade():
batch_op.create_index('workflow__conversation_variables_created_at_idx', ['created_at'], unique=False) batch_op.create_index('workflow__conversation_variables_created_at_idx', ['created_at'], unique=False)
batch_op.create_index('workflow__conversation_variables_app_id_idx', ['app_id'], unique=False) batch_op.create_index('workflow__conversation_variables_app_id_idx', ['app_id'], unique=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -38,4 +38,4 @@ def downgrade():
existing_nullable=False, existing_nullable=False,
existing_server_default=sa.text("''::character varying")) existing_server_default=sa.text("''::character varying"))
# ### end Alembic commands ### # ### end Alembic commands ###

@ -64,4 +64,4 @@ def downgrade():
type_=sa.VARCHAR(length=255), type_=sa.VARCHAR(length=255),
nullable=True) nullable=True)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -70,4 +70,4 @@ def downgrade():
existing_type=postgresql.JSON(astext_type=sa.Text()), existing_type=postgresql.JSON(astext_type=sa.Text()),
nullable=True) nullable=True)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('messages', schema=None) as batch_op: with op.batch_alter_table('messages', schema=None) as batch_op:
batch_op.drop_index('message_created_at_idx') batch_op.drop_index('message_created_at_idx')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -52,4 +52,4 @@ def downgrade():
batch_op.drop_index('child_chunk_dataset_id_idx') batch_op.drop_index('child_chunk_dataset_id_idx')
op.drop_table('child_chunks') op.drop_table('child_chunks')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('workflow_runs', schema=None) as batch_op: with op.batch_alter_table('workflow_runs', schema=None) as batch_op:
batch_op.drop_column('exceptions_count') batch_op.drop_column('exceptions_count')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -36,4 +36,4 @@ def downgrade():
sa.PrimaryKeyConstraint('id', name='tool_provider_pkey'), sa.PrimaryKeyConstraint('id', name='tool_provider_pkey'),
sa.UniqueConstraint('tenant_id', 'tool_name', name='unique_tool_provider_tool_name') sa.UniqueConstraint('tenant_id', 'tool_name', name='unique_tool_provider_tool_name')
) )
# ### end Alembic commands ### # ### end Alembic commands ###

@ -35,4 +35,4 @@ def downgrade():
# batch_op.drop_column('retry_index') # batch_op.drop_column('retry_index')
pass pass
# ### end Alembic commands ### # ### end Alembic commands ###

@ -41,4 +41,4 @@ def upgrade():
def downgrade(): def downgrade():
# No downgrade needed as we don't want to restore the column # No downgrade needed as we don't want to restore the column
pass pass

@ -44,4 +44,4 @@ def downgrade():
batch_op.drop_index('dataset_auto_disable_log_created_atx') batch_op.drop_index('dataset_auto_disable_log_created_atx')
op.drop_table('dataset_auto_disable_logs') op.drop_table('dataset_auto_disable_logs')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -38,4 +38,4 @@ def downgrade():
existing_nullable=False, existing_nullable=False,
existing_server_default=sa.text('0')) existing_server_default=sa.text('0'))
# ### end Alembic commands ### # ### end Alembic commands ###

@ -40,4 +40,4 @@ def downgrade():
batch_op.drop_index('rate_limit_log_operation_idx') batch_op.drop_index('rate_limit_log_operation_idx')
op.drop_table('rate_limit_logs') op.drop_table('rate_limit_logs')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -87,4 +87,4 @@ def downgrade():
batch_op.drop_index('dataset_metadata_binding_dataset_idx') batch_op.drop_index('dataset_metadata_binding_dataset_idx')
op.drop_table('dataset_metadata_bindings') op.drop_table('dataset_metadata_bindings')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -36,4 +36,4 @@ def downgrade():
type_=sa.VARCHAR(length=40), type_=sa.VARCHAR(length=40),
existing_nullable=False) existing_nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -26,4 +26,4 @@ def upgrade():
def downgrade(): def downgrade():
with op.batch_alter_table('workflows', schema=None) as batch_op: with op.batch_alter_table('workflows', schema=None) as batch_op:
batch_op.drop_column('marked_comment') batch_op.drop_column('marked_comment')
batch_op.drop_column('marked_name') batch_op.drop_column('marked_name')

@ -61,4 +61,4 @@ def downgrade():
type_=sa.VARCHAR(length=40), type_=sa.VARCHAR(length=40),
existing_nullable=False) existing_nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -40,4 +40,4 @@ def downgrade():
batch_op.drop_index('child_chunks_segment_idx') batch_op.drop_index('child_chunks_segment_idx')
batch_op.drop_index('child_chunks_node_idx') batch_op.drop_index('child_chunks_node_idx')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('workflow_conversation_variables', schema=None) as batch_op: with op.batch_alter_table('workflow_conversation_variables', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('workflow_conversation_variables_conversation_id_idx')) batch_op.drop_index(batch_op.f('workflow_conversation_variables_conversation_id_idx'))
# ### end Alembic commands ### # ### end Alembic commands ###

@ -48,4 +48,4 @@ def downgrade():
# Dropping `workflow_draft_variables` also drops any index associated with it. # Dropping `workflow_draft_variables` also drops any index associated with it.
op.drop_table("workflow_draft_variables") op.drop_table("workflow_draft_variables")
# ### end Alembic commands ### # ### end Alembic commands ###

@ -57,4 +57,4 @@ def downgrade():
with op.batch_alter_table('workflow_draft_variables', schema=None) as batch_op: with op.batch_alter_table('workflow_draft_variables', schema=None) as batch_op:
batch_op.drop_column('node_execution_id') batch_op.drop_column('node_execution_id')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -63,4 +63,4 @@ def downgrade():
batch_op.alter_column('sequence_number', nullable=False) batch_op.alter_column('sequence_number', nullable=False)
batch_op.create_index(batch_op.f('workflow_run_tenant_app_sequence_idx'), ['tenant_id', 'app_id', 'sequence_number'], unique=False) batch_op.create_index(batch_op.f('workflow_run_tenant_app_sequence_idx'), ['tenant_id', 'app_id', 'sequence_number'], unique=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('message_agent_thoughts', schema=None) as batch_op: with op.batch_alter_table('message_agent_thoughts', schema=None) as batch_op:
batch_op.drop_column('message_files') batch_op.drop_column('message_files')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -47,4 +47,4 @@ def downgrade():
batch_op.drop_index('app_annotation_settings_app_idx') batch_op.drop_index('app_annotation_settings_app_idx')
op.drop_table('app_annotation_settings') op.drop_table('app_annotation_settings')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('apps', schema=None) as batch_op: with op.batch_alter_table('apps', schema=None) as batch_op:
batch_op.drop_column('tracing') batch_op.drop_column('tracing')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('apps', schema=None) as batch_op: with op.batch_alter_table('apps', schema=None) as batch_op:
batch_op.drop_column('is_universal') batch_op.drop_column('is_universal')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('documents', schema=None) as batch_op: with op.batch_alter_table('documents', schema=None) as batch_op:
batch_op.drop_column('doc_language') batch_op.drop_column('doc_language')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -33,4 +33,4 @@ def downgrade():
batch_op.drop_index('api_token_tenant_idx') batch_op.drop_index('api_token_tenant_idx')
batch_op.drop_column('tenant_id') batch_op.drop_column('tenant_id')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('message_agent_thoughts', schema=None) as batch_op: with op.batch_alter_table('message_agent_thoughts', schema=None) as batch_op:
batch_op.drop_column('tool_labels_str') batch_op.drop_column('tool_labels_str')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -39,4 +39,4 @@ def downgrade():
batch_op.drop_column('privacy_policy') batch_op.drop_column('privacy_policy')
op.drop_table('tool_label_bindings') op.drop_table('tool_label_bindings')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -59,4 +59,4 @@ def downgrade():
batch_op.drop_index('tag_bind_tag_id_idx') batch_op.drop_index('tag_bind_tag_id_idx')
op.drop_table('tag_bindings') op.drop_table('tag_bindings')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -64,4 +64,4 @@ def downgrade():
op.drop_table('tool_published_apps') op.drop_table('tool_published_apps')
op.drop_table('tool_builtin_providers') op.drop_table('tool_builtin_providers')
op.drop_table('tool_api_providers') op.drop_table('tool_api_providers')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('apps', schema=None) as batch_op: with op.batch_alter_table('apps', schema=None) as batch_op:
batch_op.drop_column('max_active_requests') batch_op.drop_column('max_active_requests')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -45,4 +45,4 @@ def downgrade():
existing_type=postgresql.UUID(), existing_type=postgresql.UUID(),
nullable=False) nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('app_annotation_hit_histories', schema=None) as batch_op: with op.batch_alter_table('app_annotation_hit_histories', schema=None) as batch_op:
batch_op.drop_column('score') batch_op.drop_column('score')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -36,4 +36,4 @@ def downgrade():
type_=sa.VARCHAR(length=40), type_=sa.VARCHAR(length=40),
existing_nullable=False) existing_nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -34,4 +34,4 @@ def upgrade():
def downgrade(): def downgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
op.drop_table('tool_files') op.drop_table('tool_files')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -32,4 +32,4 @@ def downgrade():
existing_type=postgresql.UUID(), existing_type=postgresql.UUID(),
nullable=False) nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -42,4 +42,4 @@ def downgrade():
nullable=False, nullable=False,
existing_server_default=sa.text("'text-embedding-ada-002'::character varying")) existing_server_default=sa.text("'text-embedding-ada-002'::character varying"))
# ### end Alembic commands ### # ### end Alembic commands ###

@ -123,4 +123,4 @@ def downgrade():
batch_op.drop_index('load_balancing_model_config_tenant_provider_model_idx') batch_op.drop_index('load_balancing_model_config_tenant_provider_model_idx')
op.drop_table('load_balancing_model_configs') op.drop_table('load_balancing_model_configs')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('sites', schema=None) as batch_op: with op.batch_alter_table('sites', schema=None) as batch_op:
batch_op.drop_column('show_workflow_steps') batch_op.drop_column('show_workflow_steps')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -32,4 +32,4 @@ def downgrade():
batch_op.create_unique_constraint('embedding_hash_idx', ['hash']) batch_op.create_unique_constraint('embedding_hash_idx', ['hash'])
batch_op.drop_column('model_name') batch_op.drop_column('model_name')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -38,4 +38,4 @@ def downgrade():
existing_nullable=False, existing_nullable=False,
existing_server_default=sa.text("''::character varying")) existing_server_default=sa.text("''::character varying"))
# ### end Alembic commands ### # ### end Alembic commands ###

@ -32,4 +32,4 @@ def downgrade():
existing_type=postgresql.UUID(), existing_type=postgresql.UUID(),
nullable=False) nullable=False)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -42,4 +42,4 @@ def downgrade():
with op.batch_alter_table('recommended_apps', schema=None) as batch_op: with op.batch_alter_table('recommended_apps', schema=None) as batch_op:
batch_op.drop_column('custom_disclaimer') batch_op.drop_column('custom_disclaimer')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('accounts', schema=None) as batch_op: with op.batch_alter_table('accounts', schema=None) as batch_op:
batch_op.drop_column('last_active_at') batch_op.drop_column('last_active_at')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -19,4 +19,4 @@ def upgrade():
def downgrade(): def downgrade():
pass pass

@ -29,4 +29,4 @@ def downgrade():
with op.batch_alter_table('workflow_runs', schema=None) as batch_op: with op.batch_alter_table('workflow_runs', schema=None) as batch_op:
batch_op.drop_index('workflow_run_tenant_app_sequence_idx') batch_op.drop_index('workflow_run_tenant_app_sequence_idx')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -794,4 +794,4 @@ def downgrade():
op.drop_table('account_integrates') op.drop_table('account_integrates')
op.execute('DROP EXTENSION IF EXISTS "uuid-ossp";') op.execute('DROP EXTENSION IF EXISTS "uuid-ossp";')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -32,4 +32,4 @@ def downgrade():
batch_op.drop_index('workflow_node_execution_id_idx') batch_op.drop_index('workflow_node_execution_id_idx')
batch_op.drop_column('node_execution_id') batch_op.drop_column('node_execution_id')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -51,4 +51,4 @@ def downgrade():
batch_op.drop_index('dataset_retriever_resource_message_id_idx') batch_op.drop_index('dataset_retriever_resource_message_id_idx')
op.drop_table('dataset_retriever_resources') op.drop_table('dataset_retriever_resources')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -44,4 +44,4 @@ def downgrade():
batch_op.drop_index('provider_model_name_idx') batch_op.drop_index('provider_model_name_idx')
op.drop_table('dataset_collection_bindings') op.drop_table('dataset_collection_bindings')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -29,4 +29,4 @@ def downgrade():
with op.batch_alter_table('embeddings', schema=None) as batch_op: with op.batch_alter_table('embeddings', schema=None) as batch_op:
batch_op.drop_index('created_at_idx') batch_op.drop_index('created_at_idx')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
batch_op.drop_column('annotation_content') batch_op.drop_column('annotation_content')
batch_op.drop_column('annotation_question') batch_op.drop_column('annotation_question')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('app_model_configs', schema=None) as batch_op: with op.batch_alter_table('app_model_configs', schema=None) as batch_op:
batch_op.drop_column('retriever_resource') batch_op.drop_column('retriever_resource')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -64,4 +64,4 @@ def downgrade():
batch_op.drop_index('data_source_api_key_auth_binding_provider_idx') batch_op.drop_index('data_source_api_key_auth_binding_provider_idx')
op.drop_table('data_source_api_key_auth_bindings') op.drop_table('data_source_api_key_auth_bindings')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -39,4 +39,4 @@ def upgrade():
def downgrade(): def downgrade():
op.drop_table('tool_workflow_providers') op.drop_table('tool_workflow_providers')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -41,4 +41,4 @@ def downgrade():
batch_op.drop_column('sensitive_word_avoidance') batch_op.drop_column('sensitive_word_avoidance')
op.drop_table('tool_providers') op.drop_table('tool_providers')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -39,4 +39,4 @@ def downgrade():
batch_op.drop_index('idx_dataset_permissions_dataset_id') batch_op.drop_index('idx_dataset_permissions_dataset_id')
batch_op.drop_index('idx_dataset_permissions_account_id') batch_op.drop_index('idx_dataset_permissions_account_id')
op.drop_table('dataset_permissions') op.drop_table('dataset_permissions')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -39,4 +39,4 @@ def downgrade():
batch_op.drop_column('answer_price_unit') batch_op.drop_column('answer_price_unit')
batch_op.drop_column('message_price_unit') batch_op.drop_column('message_price_unit')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('tenants', schema=None) as batch_op: with op.batch_alter_table('tenants', schema=None) as batch_op:
batch_op.drop_column('custom_config') batch_op.drop_column('custom_config')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -34,4 +34,4 @@ def downgrade():
type_=sa.VARCHAR(length=255), type_=sa.VARCHAR(length=255),
existing_nullable=True) existing_nullable=True)
# ### end Alembic commands ### # ### end Alembic commands ###

@ -29,4 +29,4 @@ def downgrade():
batch_op.drop_index('user_id_idx') batch_op.drop_index('user_id_idx')
batch_op.drop_index('conversation_id_idx') batch_op.drop_index('conversation_id_idx')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -39,4 +39,4 @@ def downgrade():
batch_op.drop_column('updated_by') batch_op.drop_column('updated_by')
batch_op.drop_column('answer') batch_op.drop_column('answer')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -30,4 +30,4 @@ def downgrade():
with op.batch_alter_table('workflows', schema=None) as batch_op: with op.batch_alter_table('workflows', schema=None) as batch_op:
batch_op.drop_column('environment_variables') batch_op.drop_column('environment_variables')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('tool_api_providers', schema=None) as batch_op: with op.batch_alter_table('tool_api_providers', schema=None) as batch_op:
batch_op.drop_column('credentials_str') batch_op.drop_column('credentials_str')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -56,4 +56,4 @@ def downgrade():
batch_op.drop_index('message_file_created_by_idx') batch_op.drop_index('message_file_created_by_idx')
op.drop_table('message_files') op.drop_table('message_files')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -42,4 +42,4 @@ def downgrade():
op.drop_table('api_based_extensions') op.drop_table('api_based_extensions')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -24,4 +24,4 @@ def upgrade():
def downgrade(): def downgrade():
with op.batch_alter_table('tool_workflow_providers', schema=None) as batch_op: with op.batch_alter_table('tool_workflow_providers', schema=None) as batch_op:
batch_op.drop_column('version') batch_op.drop_column('version')

@ -42,4 +42,4 @@ def downgrade():
batch_op.create_index('pinned_conversation_conversation_idx', ['app_id', 'conversation_id', 'created_by'], unique=False) batch_op.create_index('pinned_conversation_conversation_idx', ['app_id', 'conversation_id', 'created_by'], unique=False)
batch_op.drop_column('created_by_role') batch_op.drop_column('created_by_role')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -28,4 +28,4 @@ def downgrade():
with op.batch_alter_table('message_files', schema=None) as batch_op: with op.batch_alter_table('message_files', schema=None) as batch_op:
batch_op.drop_column('belongs_to') batch_op.drop_column('belongs_to')
# ### end Alembic commands ### # ### end Alembic commands ###

@ -32,4 +32,4 @@ def downgrade():
batch_op.create_index('recommended_app_is_listed_idx', ['is_listed'], unique=False) batch_op.create_index('recommended_app_is_listed_idx', ['is_listed'], unique=False)
batch_op.drop_column('language') batch_op.drop_column('language')
# ### end Alembic commands ### # ### end Alembic commands ###

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save