数据库结构(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 在设置过程中创建的表。
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#
存储用于与集成进行身份验证的凭据。
🌐 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#
列出你实例中的项目。
🌐 Lists the projects in your instance.
project_relation#
🌐 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:
- 实例所有者是否已设置。
- 用户是否选择跳过所有者和用户管理设置。
- 是否启用某些类型的身份验证,包括 SAML 和 LDAP。
- 许可证密钥
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#
存储变量。
🌐 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.
