数据库结构#
¥Database structure
此页面描述了 n8n 数据库中每个表的用途。
¥This page describes the purpose of each table in the n8n database.
数据库和查询技术#
¥Database and query technology
默认情况下,n8n 使用 SQLite 作为数据库。如果你使用的是其他数据库,结构类似,但数据类型可能因数据库而异。
¥By default, n8n uses SQLite as the database. If you are using another database the structure will be similar, but the data-types may be different depending on the database.
n8n 使用 TypeORM 来进行查询和迁移。
¥n8n uses TypeORM for queries and migrations.
要检查 n8n 数据库,你可以使用 DBeaver,这是一个开源的通用数据库工具。
¥To inspect the n8n database, you can use DBeaver, which is an open-source universal database tool.
表格#
¥Tables
这些是 n8n 在设置过程中创建的表。
¥These are the tables n8n creates during setup.
auth_identity#
使用 SAML 时,存储外部身份验证提供程序的详细信息。
¥Stores details of external authentication providers when using SAML.
auth_provider_sync_history#
存储 SAML 连接的历史记录。
¥Stores the history of a SAML connection.
credentials_entity#
存储用于集成身份验证的 credentials。
¥Stores the credentials used to authenticate with integrations.
event_destinations#
包含 日志流 的目标配置。
¥Contains the destination configurations for Log streaming.
execution_data#
包含运行时的工作流及其执行数据。
¥Contains the workflow at time of running, and the execution data.
execution_entity#
存储所有已保存的工作流执行。工作流设置会影响 n8n 保存哪些执行版本。
¥Stores all saved workflow executions. Workflow settings can affect which executions n8n saves.
execution_metadata#
存储 自定义执行数据。
¥Stores Custom executions data.
installed_nodes#
列出你 n8n 实例中已安装的 社区节点。
¥Lists the community nodes installed in your n8n instance.
installed_packages#
安装在你的 n8n 实例中的 npm 社区节点包的详细信息。installed_nodes 列出每个单独的节点。installed_packages 列出 npm 包,这些包可能包含多个节点。
¥Details of npm community nodes packages installed in your n8n instance. installed_nodes lists each individual node. installed_packages lists npm packages, which may contain more than one node.
migrations#
所有数据库迁移的日志。在 TypeORM 文档中了解更多关于 迁移 的信息。
¥A log of all database migrations. Read more about Migrations in TypeORM's documentation.
project#
列出实例中的 projects。
¥Lists the projects in your instance.
project_relation#
描述用户与 project 之间的关系,包括用户的 角色类型。
¥Describes the relationship between a user and a project, including the user's role type.
role#
目前未使用。用于未来自定义角色开发。
¥Not currently used. For use in future work on custom roles.
settings#
记录。这些是无法通过环境变量控制的设置。它们包括:
¥Records custom instance settings. These are settings that you can't control using environment variables. They include:
- 实例所有者是否已设置。
¥Whether the instance owner is set up
- 用户是否选择跳过所有者和用户管理设置。
¥Whether the user chose to skip owner and user management setup
- 是否启用某些类型的身份验证,包括 SAML 和 LDAP。
¥Whether certain types of authentication, including SAML and LDAP, are on
- 许可证密钥
¥License key
shared_credentials#
将凭据映射到用户。
¥Maps credentials to users.
shared_workflow#
将工作流映射到用户。
¥Maps workflows to users.
tag_entity#
在 n8n 实例中创建的所有工作流标签。此表列出了标签。workflows_tags 记录哪些工作流具有哪些标签。
¥All workflow tags created in the n8n instance. This table lists the tags. workflows_tags records which workflows have which tags.
user#
包含用户数据。
¥Contains user data.
variables#
存储 variables。
¥Store variables.
webhook_entity#
记录你 n8n 实例工作流中活动的 Webhook。这不仅仅适用于 Webhook 节点中的 Webhook。它包含所有触发节点使用的活动 Webhook。
¥Records the active webhooks in your n8n instance's workflows. This isn't just webhooks uses in the Webhook node. It includes all active webhooks used by any trigger node.
workflow_entity#
你的 n8n 实例已保存的工作流。
¥Your n8n instance's saved workflows.
workflow_history#
存储工作流的先前版本。
¥Store previous versions of workflows.
workflow_statistics#
统计工作流 ID 及其状态。
¥Counts workflow IDs and their status.
workflows_tags#
将标签映射到工作流。tag_entity 包含标签详细信息。
¥Maps tags to workflows. tag_entity contains tag details.
实体关系图 (ERD)#
¥Entity Relationship Diagram (ERD)
