mirror of
https://github.com/nocobase/nocobase.git
synced 2026-08-28 17:43:07 +08:00
Merge branch 'next' into develop
This commit is contained in:
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "迁移管理",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "应用和主要插件内置表",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-backups'
|
||||
title: "备份管理"
|
||||
description: "运维管理备份:数据库及用户文件全量备份、定时备份、下载删除还原,支持 MySQL/PostgreSQL,需安装数据库客户端,专业版功能。"
|
||||
description: "运维管理备份:数据库及用户文件全量备份、定时备份、下载删除还原,支持 MySQL/PostgreSQL,需确认数据库客户端可用。"
|
||||
keywords: "备份管理,Backup,数据备份,定时备份,备份还原,MySQL PostgreSQL,运维管理,NocoBase"
|
||||
---
|
||||
# 备份管理
|
||||
@@ -12,12 +12,18 @@ NocoBase 备份管理器插件,提供了 NocoBase 数据库及用户上传文
|
||||
|
||||
## 安装数据库客户端
|
||||
|
||||
备份管理器依赖对应主数据的客户端,使用前请前往官网下载与所使用的数据库版本匹配的客户端:
|
||||
备份管理器依赖对应主数据的数据库客户端。使用前请先确认当前运行环境中已有与数据库版本匹配的客户端。
|
||||
|
||||
:::tip
|
||||
使用 Docker 安装 NocoBase 时,推荐使用对应版本的 `full` 镜像,例如 `latest-full`、`beta-full`、`alpha-full`。这类镜像已内置常用数据库客户端,通常无需手动安装。
|
||||
:::
|
||||
|
||||
如果当前环境缺少数据库客户端,请前往官网下载与所使用的数据库版本匹配的客户端:
|
||||
|
||||
- MySQL:https://dev.mysql.com/downloads/
|
||||
- PostgreSQL:https://www.postgresql.org/download/
|
||||
|
||||
Docker 版本,可以直接在 `./storage/scripts` 目录下,编写一段脚本
|
||||
如需在 Docker 环境中手动安装,可以直接在 `./storage/scripts` 目录下,编写一段脚本
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,424 @@
|
||||
---
|
||||
title: "应用和主要插件内置表"
|
||||
description: "应用和主要插件内置表参考,说明迁移管理默认策略、版本控制范围和备份还原处理方式。"
|
||||
keywords: "迁移管理,版本控制,备份还原,内置表,应用配置,插件配置,dataCategory,覆盖,仅结构,跳过,NocoBase"
|
||||
---
|
||||
|
||||
# 应用和主要插件内置表
|
||||
|
||||
## 介绍
|
||||
|
||||
这份清单用于说明应用和主要插件内置表在迁移管理、版本控制、备份还原中的常见处理方式。多数情况下,用户不需要逐表调整,按默认策略处理即可。
|
||||
|
||||
三类机制关注点不同:
|
||||
|
||||
- **迁移管理**:用于跨环境发布,常见策略包括覆盖、仅结构和跳过。
|
||||
- **版本控制**:用于保存和恢复应用搭建过程中的关键节点。
|
||||
- **备份还原**:用于应用运行态的备份与恢复。
|
||||
|
||||
表中的“数据类型”来自内置分类。系统基础数据参与版本控制;业务运行数据不参与版本控制;运行态临时数据不备份。
|
||||
|
||||
## 内置表参考
|
||||
|
||||
### Database
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | ORM/SQL 迁移已执行版本记录 | 系统基础数据 | 仅结构 | 参与 | 备份 |
|
||||
|
||||
### Server
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | 当前应用实例加载的插件清单及版本 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `applicationVersion` | 应用与核心版本号,用于升级与兼容判断 | 系统基础数据 | 仅结构 | 参与 | 备份 |
|
||||
|
||||
### 系统设置
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | 安装级系统参数与功能开关 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 客户端
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | PC 端菜单与路由结构 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
|
||||
### 多空间
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | 多空间/工作区隔离的顶层容器 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `spacesUsers` | 用户与空间的成员关系 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 应用监管
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | 应用监控插件管理的应用条目 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 主数据源
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | 业务集合在界面上的分组归类 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `collections` | 业务集合的字段、索引与元配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `fields` | 集合下各字段的类型与约束说明 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 数据源管理
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | 主库或外部数据库连接配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `dataSourcesCollections` | 外部源中的表/集合同步映射 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `dataSourcesFields` | 外部字段与 NocoBase 字段映射 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `dataSourcesRoles` | 数据源级的访问角色 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `dataSourcesRolesResources` | 角色可访问的集合/操作 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `dataSourcesRolesResourcesActions` | 允许的具体动作,如增删改查 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `dataSourcesRolesResourcesScopes` | 行级或筛选范围限制 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 外部数据库连接
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | 可供连接的数据库实例登记信息 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 可视化数据建模
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | 流程/图编辑器上节点的位置缓存 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 中国行政区字段
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | 省市区等地理数据字典 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 自动编码字段
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | 自增业务编号的序列表 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | 按钮权限与角色的关联 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `uiSchemaServerHooks` | 服务端对 UI 配置的钩子扩展点 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `uiSchemaTemplates` | 可复用的表单/详情布局片段 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `uiSchemaTreePath` | 组件树层级物化路径,加速查询 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `uiSchemas` | 页面与区块的 JSON 布局描述 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### UI 模板
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | 哪些实体实例化了某流程模板 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `flowModelTemplates` | 可复用的流程结构模板 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | 流程模型树形结构的物化路径,加速查询 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `flowModels` | 新版流程编排的模型定义(节点与连线) | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `flowSql` | 流程中执行的 SQL 片段或脚本登记 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 区块模板
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | 页面与区块模板之间的引用关系 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `blockTemplates` | 可复用的界面区块片段定义 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### iframe 区块
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | 嵌入式 iframe 所需 HTML 配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 移动端
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | 移动应用菜单与路由 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 主题编辑器
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | 明暗色与品牌色等界面主题 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 地图区块
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | 地图控件的中心、缩放与底图等配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 公开表单
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | 免登录可填的外部表单配置与提交记录索引 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 模板打印
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | 列表或详情的打印版式模板 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### ACL
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | 权限集合的角色定义 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `rolesResources` | 角色被授权访问的资源项 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `rolesResourcesActions` | 在资源上允许的动作,如 view、update | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `rolesResourcesScopes` | 角色可见的数据过滤范围 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `rolesUsers` | 用户与角色的多对多绑定 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 认证
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | 密码、第三方等登录方式的配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `tokenControlConfig` | 会话长度、刷新策略等 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `issuedTokens` | 登录或 API 下发的访问令牌记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `tokenBlacklist` | 已注销或强制失效的令牌列表 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `usersAuthenticators` | 用户与各认证方式的绑定关系 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 双因素认证
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA 方式与用户级开关 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### API keys
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | 开放 API 访问用的密钥与权限范围 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 密码策略
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | 复杂度、有效期等密码安全策略 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `lockedUsers` | 因策略被临时锁定的账号记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `userPasswordHistory` | 防止重复使用的最近密码摘要 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### IP 限制
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | 允许或禁止访问的 IP 规则 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 用户
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | 登录账号、资料与基础状态 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 部门
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | 组织架构中的部门树 | 业务运行数据 | 覆盖 | 不参与 | 备份 |
|
||||
| `departmentsRoles` | 部门与默认角色绑定 | 业务运行数据 | 覆盖 | 不参与 | 备份 |
|
||||
| `departmentsUsers` | 用户所属部门关系 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 用户数据同步
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | 外部身份源或账户体系连接配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `userDataSyncRecords` | 一次同步任务的执行记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `userDataSyncRecordsResources` | 同步任务涉及的表或资源项 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `userDataSyncTasks` | 同步任务记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 工作流
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | 工作流节点 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `workflows` | 自动化流程图、触发器与节点配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `jobs` | 工作流执行过程中,每个节点的执行结果 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `executions` | 一次工作流运行的状态、输入输出与日志索引 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `userWorkflowTasks` | 各个用户不同类型待办的统计数量 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `workflowCategories` | 工作流在界面上的分组 | 业务运行数据 | 覆盖 | 不参与 | 备份 |
|
||||
| `workflowCategoryRelations` | 工作流与分类的多对多关系 | 业务运行数据 | 覆盖 | 不参与 | 备份 |
|
||||
| `workflowStats` | 运行次数、成功率等汇总指标 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `workflowTasks` | 各类自动化节点的任务执行记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `workflowVersionStats` | 按版本的执行与性能统计 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 工作流审批
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | 审批受众与具体用户的关联 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `approvalAudiences` | 按角色或用户分组的审批通知/参与范围 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `approvalExecutions` | 一次审批流的运行状态与当前节点 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `approvalMsgTpls` | 审批通知、待办等消息模板内容 | 业务运行数据 | 覆盖 | 不参与 | 备份 |
|
||||
| `approvalRecords` | 个人视角的审批任务与处理结果 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `approvals` | 审批流模板与步骤配置 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 工作流人工节点
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | 需要人工处理的手工节点任务 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 工作流抄送
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | 仅抄送、不需办理的待阅事项 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 通知管理
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | 站内信、邮件等投递渠道配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `notificationSendLogs` | 每条通知的投递状态与失败原因 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 站内信
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | 用户收到的应用内消息 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 验证
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | 谁可以发起或完成核验的配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `otpRecords` | 短信/邮件 OTP 的发放与校验记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `usersVerifiers` | 用户与核验渠道或实体的绑定 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 邮件管理
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | 全局邮件行为与默认值 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `mailSettings` | 邮件插件级开关与参数 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `mailAccounts` | 发信邮箱账号与 SMTP 配置 | 业务运行数据 | 覆盖 | 不参与 | 备份 |
|
||||
| `mailMassMessages` | 群发任务与收件批次 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `mailMessageLabels` | 邮件分类标签定义 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `mailMessageNotes` | 单封邮件的内部备注 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `mailMessages` | 已同步或发送的邮件内容索引 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `mailTemplates` | 通知类邮件的 HTML/文本模板 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `mailmessagelabelsMailmessages` | 邮件与多对多标签的中间关系 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `mailmessagelabelsMailmessagesRel` | 邮件标签关联的辅助字段或扩展表 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### AI
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | 数字员工档案:昵称、技能、模型与知识库等配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `aiSettings` | AI 基础设置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `rolesAiEmployees` | AI 员工角色关系 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `llmServices` | 对接的 LLM 供应商与模型端点配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `aiContextDatasources` | 为 AI 员工配置可查询的业务集合、字段与过滤条件 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `aiConversations` | 单次会话与话题、消息线索等对话上下文 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `aiFiles` | AI 插件产生的上传文件与存储引用 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `aiMessages` | 对话中的用户与助手消息内容 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `aiToolMessages` | Function / 工具调用的请求与返回记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `usersAiEmployees` | 用户自定义提示词与AI 员工的关系表 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `lcCheckpointBlobs` | 大模型对话检查点的二进制块 | 运行态临时数据 | 仅结构 | 不参与 | 不备份 |
|
||||
| `lcCheckpointWrites` | 检查点增量写入记录 | 运行态临时数据 | 仅结构 | 不参与 | 不备份 |
|
||||
| `lcCheckpoints` | 可恢复对话的 LangGraph 检查点元信息 | 运行态临时数据 | 仅结构 | 不参与 | 不备份 |
|
||||
|
||||
### AI 知识库
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | 已入库的文档切片与索引元数据 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `aiKnowledgeBase` | 知识库类型、外部 ID 与基础信息 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `aiVectorDatabases` | 向量数据库服务与连接配置 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `aiVectorStoreConfig` | 向量数据库连接和文本嵌入模型关联关系 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 环境变量
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | 部署相关的键值,如密钥占位名 | 系统基础数据 | 仅结构 | 参与 | 备份 |
|
||||
|
||||
### 迁移管理
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | 迁移管理器中的规则与作用范围配置 | 系统基础数据 | 仅结构 | 参与 | 备份 |
|
||||
|
||||
### 备份管理
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | 自动备份策略与保留策略 | 业务运行数据 | 覆盖 | 不参与 | 备份 |
|
||||
|
||||
### 审计日志
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | 谁在何时对哪些资源做了操作的追踪 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 异步任务
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | 长时间任务的队列、状态与结果 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 记录历史
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | 启用字段留痕的集合登记 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `recordHistoryFields` | 需要记录历史的字段列表 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `recordHistoryTemplate` | 历史记录在界面上的展示模板 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `recordFieldHistories` | 某字段历次修改的值与时间线 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `recordFieldSnapshots` | 某时间点字段值的快照存证 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
| `recordHistories` | 整条记录的版本化变更记录 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 文件管理
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | 本地、S3、OSS 等存储桶配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `attachments` | 业务记录关联的文件附件元数据 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 本地化
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | 待翻译的键与默认文案 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `localizationTranslations` | 各语言实际翻译内容 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 本地化测试
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | 本地化调试或测试用词条 | 业务运行数据 | 仅结构 | 不参与 | 备份 |
|
||||
|
||||
### 自定义请求
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | 自定义 HTTP 请求动作与 URL、方法配置 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
| `customRequestsRoles` | 哪些角色可调用哪些自定义请求 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
### 自定义变量
|
||||
|
||||
| 数据表 | 说明 | 数据类型 | 迁移管理默认策略 | 版本控制 | 备份还原 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | 流程或全局可用的变量定义与默认值 | 系统基础数据 | 覆盖 | 参与 | 备份 |
|
||||
|
||||
## 用户自定义表
|
||||
|
||||
用户自定义表默认按业务数据处理。多数情况下,只需要迁移表结构,选择仅结构。
|
||||
|
||||
如果用户自定义表用于承载业务配置、分类、模板、规则等元数据,并且这些记录应随发布从开发环境同步到预发布或生产环境,可以根据业务场景选择覆盖。
|
||||
|
||||
如果用户自定义表保存的是客户、订单、工单、审批记录、消息、日志等运行数据,应避免覆盖生产环境中的记录。
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "迁移管理"
|
||||
description: "运维管理迁移:将应用配置从一环境迁移至另一环境,支持仅结构、覆盖、Upsert、插入忽略重复、跳过等迁移规则,依赖备份管理插件。"
|
||||
keywords: "迁移管理,Migration,应用配置迁移,迁移规则,Upsert,数据库迁移,运维管理,NocoBase"
|
||||
description: "运维管理迁移:将应用配置从一环境迁移至另一环境,支持仅结构、覆盖、跳过等迁移规则,依赖备份管理插件。"
|
||||
keywords: "迁移管理,Migration,应用配置迁移,迁移规则,仅结构,覆盖,跳过,数据库迁移,运维管理,NocoBase"
|
||||
---
|
||||
# 迁移管理
|
||||
|
||||
@@ -29,17 +29,15 @@ keywords: "迁移管理,Migration,应用配置迁移,迁移规则,Upsert,数据
|
||||
|
||||
### 内置规则
|
||||
|
||||
支持以下五种迁移规则:
|
||||
支持以下三种迁移规则:
|
||||
|
||||
- **仅结构:** 只同步数据表结构,不涉及数据的插入或更新。
|
||||
- **覆盖(清空并重新插入):** 清空现有表记录,然后插入新数据。
|
||||
- **插入或更新 (Upsert):** 根据主键判断,记录存在则更新,不存在则插入。
|
||||
- **插入时忽略重复:** 插入新记录,如果主键冲突则忽略(不更新现有记录)。
|
||||
- **跳过:** 对该表不做任何处理。
|
||||
|
||||
**备注:**
|
||||
- 覆盖、插入或更新、插入时忽略重复也会同步表结构的变化。
|
||||
- 自增 ID 作为主键 or 无主键的表不支持 "插入或更新" 和 "插入时忽略重复"。
|
||||
- 覆盖也会同步表结构的变化。
|
||||
- 用户自定义业务数据表通常选择仅结构,避免覆盖生产环境中的业务数据。
|
||||
|
||||
### 详细设计
|
||||
|
||||
@@ -49,6 +47,8 @@ keywords: "迁移管理,Migration,应用配置迁移,迁移规则,Upsert,数据
|
||||
|
||||
配置迁移规则
|
||||
|
||||
如需了解默认策略对应的数据表,参考:[应用和主要插件内置表](./built-in-tables.md)。
|
||||
|
||||

|
||||
|
||||
启用独立规则
|
||||
|
||||
@@ -1,58 +1,139 @@
|
||||
---
|
||||
title: "发布管理"
|
||||
description: "运维管理发布流程:开发、预发布、生产多环境部署,变量与密钥、备份管理、迁移管理插件配合,单个/多个开发环境发布流程、迁移规则配置。"
|
||||
keywords: "发布管理,Release,多环境部署,开发预发布生产,迁移规则,运维管理,NocoBase"
|
||||
description: "运维管理发布最佳实践:使用版本控制记录开发节点,使用多应用拆分业务模块,使用备份管理进行容灾,使用迁移管理完成开发、预发布、生产环境的发布。"
|
||||
keywords: "发布管理,Release,多环境部署,版本控制,多应用,备份管理,迁移管理,开发预发布生产,NocoBase"
|
||||
---
|
||||
|
||||
# 发布管理
|
||||
|
||||
## 介绍
|
||||
|
||||
在实际应用中,为确保数据安全和应用的稳定运行,我们通常需要部署多个环境,例如开发环境、预发布环境和生产环境。本篇文档将以两种常见的无代码开发流程为例,详细说明如何在 NocoBase 中实现发布管理。
|
||||
发布管理用于规范应用从开发到生产的交付过程。它关注的不是单次操作,而是一套可重复、可验证、可回退的发布机制。
|
||||
|
||||
## 安装
|
||||
生产环境应保持稳定。配置变更先在开发环境完成,再进入预发布环境验证。验证通过后,再发布到生产环境。发布过程中产生的迁移文件、备份、执行日志和验证结果,都应妥善保存,作为后续排查和回滚的依据。
|
||||
|
||||
发布管理必备的三个插件,请确保已经激活以下插件。
|
||||
推荐环境如下:
|
||||
|
||||
### 变量与密钥
|
||||
```text
|
||||
开发环境 -> 预发布环境 -> 生产环境
|
||||
```
|
||||
|
||||
- 内置插件,默认安装并激活。
|
||||
- 集中配置和管理环境变量和密钥,用于敏感数据存储、配置数据重用、环境配置隔离等([查看文档](../variables-and-secrets/index.md))。
|
||||
开发环境用于配置和调整。预发布环境用于还原生产约束并验证发布结果。生产环境用于承载真实业务。三类环境职责清晰后,发布过程才容易管理。
|
||||
|
||||
### 备份管理
|
||||
## 发布模型
|
||||
|
||||
- 此插件仅在专业版及以上版本中可用([了解详情](https://www.nocobase.com/en/commercial))。
|
||||
- 提供备份与还原功能,支持定时备份,确保数据安全与快速恢复([查看文档](../backup-manager/index.mdx))。
|
||||
NocoBase 的发布管理通常由五类能力配合完成。
|
||||
|
||||
### 迁移管理
|
||||
| 能力 | 解决的问题 | 使用阶段 |
|
||||
| --- | --- | --- |
|
||||
| 版本控制 | 保存开发过程中的关键节点,为配置调整提供回退点 | 开发阶段 |
|
||||
| 变量与密钥 | 隔离不同环境的配置和敏感信息 | 开发、预发布与生产发布 |
|
||||
| 多应用 | 按业务模块拆分系统边界,降低模块之间的发布影响 | 架构规划与团队协作 |
|
||||
| 备份管理 | 保存生产可恢复状态,为发布失败和日常故障提供恢复依据 | 发布前与日常容灾 |
|
||||
| 迁移管理 | 将配置和结构变更发布到目标环境 | 预发布与生产发布 |
|
||||
|
||||
- 此插件仅在专业版及以上版本中可用([了解详情](https://www.nocobase.com/en/commercial))。
|
||||
- 用于将应用配置从一个应用环境迁移到另一个应用环境([查看文档](../migration-manager/index.md))。
|
||||
## 环境配置:使用变量与密钥
|
||||
|
||||
## 常见无代码开发流程
|
||||
变量与密钥用于隔离不同环境的配置和敏感信息。开发、预发布和生产环境应使用各自的变量和密钥。
|
||||
|
||||
### 单个开发环境,单向发布
|
||||
开发阶段就应提前识别环境相关配置。数据库连接、第三方服务地址、测试账号、访问令牌、API Key、Webhook 地址等,不应直接写死在页面、工作流或插件配置中,应尽量通过变量与密钥引用。这样迁移到预发布或生产环境时,只需要根据提示补充目标环境缺失的配置,避免把生产密钥写入迁移内容。
|
||||
|
||||
适用于简单的开发流程。开发、预发布和生产环境各自只有一个,变更从开发环境依次发布到预发布环境,最终部署到生产环境。在这个流程里,只有开发环境可以修改配置,预发布和生产环境都不允许修改。
|
||||
相关文档:[变量与密钥](../variables-and-secrets/index.md)。
|
||||
|
||||
## 开发阶段:记录可恢复节点
|
||||
|
||||
开发阶段变化频繁,适合使用版本控制保存关键节点。一次较大的配置调整开始前,可以先创建版本。数据模型、页面、权限、工作流或插件配置调整完成后,再创建一个新的版本。
|
||||
|
||||
版本描述应写清楚本次变更的业务含义。例如“调整客户跟进页面和字段权限”“新增工单升级工作流”“优化资产领用审批流程”。描述越明确,后续验证、对比和恢复越容易。
|
||||
|
||||
版本控制主要服务于开发过程。它适合撤销一次配置调整,也适合保留阶段性成果。进入发布阶段后,配置变更应通过迁移管理同步到目标环境;生产环境需要恢复时,应使用备份管理。
|
||||
|
||||
相关文档:[版本控制](../version-control/index.md)。
|
||||
|
||||
## 模块拆分:控制发布边界
|
||||
|
||||
系统规模较小时,可以从单应用开始。单应用部署简单,适合原型验证、小型内部系统和早期项目。
|
||||
|
||||
当业务复杂度上升后,单个应用会承载越来越多页面、数据表、权限和工作流。一次配置变更可能影响多个团队。一次发布也可能牵动多个模块。此时应考虑使用多应用拆分业务边界。
|
||||
|
||||
多应用适合按业务职责拆分。例如 CRM、工单、资产、HR、报表、运营后台。每个应用可以独立开发、测试、发布和回滚。高频变更模块、高风险模块、面向不同用户群体的模块,通常更适合独立出来。
|
||||
|
||||
拆分前需要先规划公共能力。用户、组织、认证、权限和跨应用共享数据,都会影响后续发布方式。边界越清晰,发布影响范围越容易控制。
|
||||
|
||||
拆分后的发布链路通常如下:
|
||||
|
||||
```text
|
||||
CRM 应用:开发环境 -> 预发布环境 -> 生产环境
|
||||
工单应用:开发环境 -> 预发布环境 -> 生产环境
|
||||
资产应用:开发环境 -> 预发布环境 -> 生产环境
|
||||
```
|
||||
|
||||
相关文档:[多应用管理](../../multi-app/multi-app/index.md)。
|
||||
|
||||
## 发布前准备:确认恢复能力
|
||||
|
||||
备份是生产发布的安全底线。生产环境发布前,应创建发布前备份。重要发布还应先在独立环境验证备份可还原。
|
||||
|
||||
发布前备份和日常定时备份用途不同。日常定时备份用于应对误操作、数据损坏和基础设施故障。发布前备份用于发布失败后的快速恢复。两类备份都应纳入生产运维策略。
|
||||
|
||||
发布前需要确认备份任务已完成,备份文件可下载或可访问。重要发布还应在独立环境中做一次恢复验证,确认备份可以正常还原。
|
||||
|
||||
备份应覆盖数据库、用户上传文件,以及应用运行所需的存储内容。只记录数据库,不足以覆盖完整恢复场景。
|
||||
|
||||
相关文档:[备份管理](../backup-manager/index.mdx)。
|
||||
|
||||
## 发布执行:迁移到目标环境
|
||||
|
||||
迁移管理用于将应用配置从一个环境发布到另一个环境。常见迁移内容包括应用配置、数据表结构、插件配置,以及部分需要迁移的数据。
|
||||
|
||||
推荐先发布到预发布环境。迁移文件在预发布环境验证通过后,再用于生产发布。
|
||||
|
||||

|
||||
|
||||
配置迁移规则时,内核和插件内置表选择「覆盖优先」规则,其他的如果无特殊需要可以按默认处理
|
||||
### 发布到预发布环境
|
||||
|
||||
从开发环境生成迁移文件后,先在预发布环境执行。预发布环境应尽量接近生产环境,包括内核版本、插件版本、变量、密钥、权限配置和外部系统连接方式。执行后验证核心页面、权限规则、工作流和外部系统集成。
|
||||
|
||||
预发布验证通过后,应保留同一份迁移文件用于生产发布。不要在发布到生产前临时修改迁移文件。需要调整时,回到开发环境重新生成,并重新经过预发布验证。
|
||||
|
||||
### 发布到生产环境
|
||||
|
||||
生产发布应安排维护窗口。开始前通知用户维护时间,并停止用户访问或切换维护页,避免迁移期间产生新的业务数据。集群或多节点部署场景下,迁移前应先将应用缩容为一个节点。
|
||||
|
||||
确认发布前备份完成后,再执行已在预发布环境验证过的迁移文件。迁移完成后,先验证核心业务流程,再恢复用户访问。多节点部署场景下,验证通过后再恢复节点数量。
|
||||
|
||||
迁移文件、备份和执行日志会分别保存在对应功能中。团队内部的发布记录可补充发布时间、执行人、验证结果和备份信息,方便后续排查和回滚。
|
||||
|
||||
### 迁移规则
|
||||
|
||||
迁移规则决定目标环境中数据表和记录如何处理。目前常用策略包括覆盖、仅结构和跳过。配置规则时,应先区分应用和插件内置表、用户自定义表,再选择处理方式。
|
||||
|
||||
应用和插件内置表通常按默认策略处理,选择覆盖优先。例如页面、菜单、区块、权限、工作流等应用配置。发布时通常以开发环境中的配置为准,同步到预发布和生产环境。
|
||||
|
||||
用户自定义表需要按业务用途判断。承载真实业务数据的表,通常只迁移表结构,选择仅结构,避免覆盖生产环境中持续产生的数据。部分用户自定义表如果用于承载配置、分类、模板、规则等元数据,可以根据实际业务场景选择覆盖。
|
||||
|
||||
如需了解默认策略对应的数据表,参考:[应用和主要插件内置表](../migration-manager/built-in-tables.md)。
|
||||
|
||||

|
||||
|
||||
### 多个开发环境,合并发布
|
||||
迁移管理主要处理主数据库中的应用配置和数据。外部数据源、子应用数据和部分存储目录内容,应根据实际情况单独处理。
|
||||
|
||||
适用于多人协作或复杂项目场景。多个并行的开发环境可以独立开发,所有变更统一合并到预发布环境进行测试与验证,最后发布到生产环境。在这个流程里,也只有开发环境可以修改配置,预发布和生产环境都不允许修改。
|
||||
相关文档:[迁移管理](../migration-manager/index.md)。
|
||||
|
||||

|
||||
## 回滚与恢复
|
||||
|
||||
配置迁移规则时,内核和插件内置表选择「插入或更新优先」规则,其他的如果无特殊需要可以按默认处理
|
||||
发布失败时,优先通过备份管理插件使用发布前备份恢复。执行还原前,先确认备份文件可用,并根据界面提示完成还原操作。
|
||||
|
||||

|
||||
如果当前生产环境仍可正常进入备份管理,且只是迁移执行失败,可以直接在当前环境中还原发布前备份。恢复完成后,应记录失败原因和处理结果,避免后续发布重复触发同类问题。
|
||||
|
||||
## 回滚
|
||||
|
||||
执行迁移前,会自动对当前应用进行备份。如果迁移失败或结果不符合预期,可通过 [备份管理器](../backup-manager/index.mdx) 进行回滚恢复。
|
||||
如果当前环境状态不稳定,或希望降低在故障环境中反复修复的风险,可以准备独立环境并还原发布前备份。还原后先验证核心业务流程,再将流量切换到恢复后的环境。
|
||||
|
||||

|
||||
|
||||
## 相关文档
|
||||
|
||||
- [变量与密钥](../variables-and-secrets/index.md)
|
||||
- [版本控制](../version-control/index.md)
|
||||
- [多应用管理](../../multi-app/multi-app/index.md)
|
||||
- [备份管理](../backup-manager/index.mdx)
|
||||
- [迁移管理](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Migrationsverwaltung",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Integrierte Tabellen von Anwendungen und wichtigen Plugins",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,12 +10,18 @@ Das NocoBase Sicherungsmanager-Plugin bietet Funktionen für die vollständige S
|
||||
|
||||
## Datenbank-Client installieren
|
||||
|
||||
Der Sicherungsmanager benötigt den Client für die entsprechende Datenbank. Bevor Sie ihn verwenden, laden Sie bitte den Client, der Ihrer Datenbankversion entspricht, von der offiziellen Website herunter:
|
||||
Die Sicherungsverwaltung benötigt den Datenbank-Client der primären Datenbank. Prüfen Sie vor der Verwendung, ob die aktuelle Laufzeitumgebung einen zur Datenbankversion passenden Client enthält.
|
||||
|
||||
:::tip
|
||||
Wenn Sie NocoBase mit Docker installieren, verwenden Sie nach Möglichkeit das entsprechende `full`-Image, zum Beispiel `latest-full`, `beta-full` oder `alpha-full`. Diese Images enthalten gängige Datenbank-Clients, sodass normalerweise keine manuelle Installation erforderlich ist.
|
||||
:::
|
||||
|
||||
Wenn in der aktuellen Umgebung kein passender Datenbank-Client vorhanden ist, laden Sie den Client passend zur Datenbankversion von der offiziellen Website herunter:
|
||||
|
||||
- MySQL: https://dev.mysql.com/downloads/
|
||||
- PostgreSQL: https://www.postgresql.org/download/
|
||||
|
||||
Für Docker-Versionen können Sie direkt im Verzeichnis `./storage/scripts` ein Skript erstellen:
|
||||
Wenn Sie ihn in einer Docker-Umgebung manuell installieren müssen, können Sie im Verzeichnis `./storage/scripts` ein Skript erstellen:
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Integrierte Tabellen von Anwendungen und wichtigen Plugins"
|
||||
description: "Referenz zu integrierten Tabellen, Standardstrategien der Migrationsverwaltung, Versionsverwaltungsumfang und Backup-/Wiederherstellungsverhalten."
|
||||
keywords: "Migrationsverwaltung,Versionsverwaltung,Backup,Wiederherstellung,integrierte Tabellen,NocoBase"
|
||||
---
|
||||
|
||||
# Integrierte Tabellen von Anwendungen und wichtigen Plugins
|
||||
|
||||
## Einführung
|
||||
|
||||
Diese Liste beschreibt die übliche Behandlung integrierter Tabellen von Anwendungen und wichtigen Plugins in Migrationsverwaltung, Versionsverwaltung und Backup/Wiederherstellung. In den meisten Fällen müssen Benutzer Tabellen nicht einzeln anpassen. Verwenden Sie die Standardstrategie.
|
||||
|
||||
Die Mechanismen haben unterschiedliche Schwerpunkte:
|
||||
|
||||
- **Migrationsverwaltung**: für Veröffentlichungen zwischen Umgebungen. Typische Strategien sind Überschreiben, Nur Struktur und Überspringen.
|
||||
- **Versionsverwaltung**: speichert und stellt wichtige Punkte beim Aufbau der Anwendung wieder her.
|
||||
- **Backup/Wiederherstellung**: sichert und stellt den Laufzeitstand der Anwendung wieder her.
|
||||
|
||||
Die Spalte „Datentyp“ stammt aus der integrierten Klassifikation. Systembasisdaten nehmen an der Versionsverwaltung teil; Geschäftslaufzeitdaten nicht; temporäre Laufzeitdaten werden nicht gesichert.
|
||||
|
||||
## Referenz integrierter Tabellen
|
||||
|
||||
### Database
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | Systembasisdaten | Nur Struktur | Teilnahme | Gesichert |
|
||||
|
||||
### Server
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | Systembasisdaten | Nur Struktur | Teilnahme | Gesichert |
|
||||
|
||||
### System settings
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Client
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `spacesUsers` | Membership between users and spaces | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `collections` | Business collection fields, indexes, and metadata | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `fields` | Field types and constraints under collections | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### China region field
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `flowModels` | Model definitions for the modern flow engine | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `blockTemplates` | Reusable UI block definitions | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Map block
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### ACL
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `rolesResources` | Resources granted to roles | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `issuedTokens` | Issued login or API access tokens | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### API keys
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Users
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Departments
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Geschäftslaufzeitdaten | Überschreiben | Keine Teilnahme | Gesichert |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Geschäftslaufzeitdaten | Überschreiben | Keine Teilnahme | Gesichert |
|
||||
| `departmentsUsers` | Relationships between users and departments | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `userDataSyncTasks` | Synchronization task records | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `jobs` | Execution result of each node in a workflow run | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Geschäftslaufzeitdaten | Überschreiben | Keine Teilnahme | Gesichert |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Geschäftslaufzeitdaten | Überschreiben | Keine Teilnahme | Gesichert |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Geschäftslaufzeitdaten | Überschreiben | Keine Teilnahme | Gesichert |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `approvals` | Approval-flow templates and step configuration | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Verification
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `mailSettings` | Mail plugin switches and parameters | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Geschäftslaufzeitdaten | Überschreiben | Keine Teilnahme | Gesichert |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `mailMessageLabels` | Mail category label definitions | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### AI
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `aiSettings` | AI basic settings | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `aiMessages` | User and assistant messages in conversations | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Temporäre Laufzeitdaten | Nur Struktur | Keine Teilnahme | Nicht gesichert |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Temporäre Laufzeitdaten | Nur Struktur | Keine Teilnahme | Nicht gesichert |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Temporäre Laufzeitdaten | Nur Struktur | Keine Teilnahme | Nicht gesichert |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | Systembasisdaten | Nur Struktur | Teilnahme | Gesichert |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | Systembasisdaten | Nur Struktur | Teilnahme | Gesichert |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Geschäftslaufzeitdaten | Überschreiben | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Record history
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `recordHistoryFields` | Fields that need history records | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `recordHistoryTemplate` | Display template for history records | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
| `recordHistories` | Versioned change records for entire records | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### File manager
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `attachments` | File attachment metadata associated with business records | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Localization
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `localizationTranslations` | Actual translated content for each language | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Geschäftslaufzeitdaten | Nur Struktur | Keine Teilnahme | Gesichert |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Tabelle | Beschreibung | Datentyp | Standardstrategie der Migration | Versionsverwaltung | Backup/Wiederherstellung |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | Systembasisdaten | Überschreiben | Teilnahme | Gesichert |
|
||||
|
||||
## Benutzerdefinierte Tabellen
|
||||
|
||||
Benutzerdefinierte Tabellen werden standardmäßig als Geschäftsdaten behandelt. Meist wird nur die Tabellenstruktur migriert; wählen Sie Nur Struktur.
|
||||
|
||||
Wenn eine benutzerdefinierte Tabelle Konfiguration, Kategorien, Vorlagen, Regeln oder andere Metadaten speichert, können diese Datensätze je nach Szenario per Überschreiben synchronisiert werden.
|
||||
|
||||
Wenn sie Laufzeitdaten wie Kunden, Aufträge, Tickets, Genehmigungen, Nachrichten oder Logs speichert, vermeiden Sie das Überschreiben von Produktionsdaten.
|
||||
@@ -1,5 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Migrationsverwaltung"
|
||||
description: "Betriebliche Migration: Anwendungskonfiguration zwischen Umgebungen migrieren, mit Regeln für Nur Struktur, Überschreiben und Überspringen. Abhängig von der Backup-Verwaltung."
|
||||
keywords: "Migrationsverwaltung,Migration,Anwendungskonfiguration,Migrationsregeln,Nur Struktur,Überschreiben,Überspringen,NocoBase"
|
||||
---
|
||||
|
||||
# Migrations-Manager
|
||||
@@ -22,19 +25,15 @@ Der Migrations-Manager überträgt Tabellen und Daten aus der Hauptdatenbank, ba
|
||||
|
||||
### Integrierte Regeln
|
||||
|
||||
Der Migrations-Manager kann alle Tabellen in der Hauptdatenbank migrieren. Dabei werden derzeit die folgenden fünf Regeln unterstützt:
|
||||
Die Migrationsverwaltung unterstützt die folgenden drei Regeln:
|
||||
|
||||
- **Nur Struktur:** Es wird nur die Struktur (Schema) der Tabellen migriert – es werden keine Daten eingefügt oder aktualisiert.
|
||||
- **Überschreiben (leeren und neu einfügen):** Alle vorhandenen Datensätze aus der Zieldatenbanktabelle werden gelöscht und anschließend die neuen Daten eingefügt.
|
||||
- **Einfügen oder Aktualisieren (Upsert):** Es wird geprüft, ob ein Datensatz (anhand des Primärschlüssels) bereits existiert. Falls ja, wird der Datensatz aktualisiert; falls nein, wird er eingefügt.
|
||||
- **Einfügen ignorieren bei Duplikat:** Neue Datensätze werden eingefügt. Existiert ein Datensatz (anhand des Primärschlüssels) bereits, wird der Einfügevorgang ignoriert (es erfolgen keine Aktualisierungen).
|
||||
- **Überspringen:** Die Verarbeitung für die Tabelle wird vollständig übersprungen (keine Strukturänderungen, keine Datenmigration).
|
||||
- **Nur Struktur:** Synchronisiert nur Tabellenstrukturen. Es werden keine Daten eingefügt oder aktualisiert.
|
||||
- **Überschreiben:** Löscht vorhandene Tabellendatensätze und fügt anschließend neue Daten ein.
|
||||
- **Überspringen:** Führt für diese Tabelle keine Verarbeitung aus.
|
||||
|
||||
**Hinweise:**
|
||||
|
||||
- Die Regeln „Überschreiben“, „Einfügen oder Aktualisieren“ und „Einfügen ignorieren bei Duplikat“ synchronisieren ebenfalls Änderungen an der Tabellenstruktur.
|
||||
- Wenn eine Tabelle einen automatisch inkrementierenden Primärschlüssel verwendet oder keinen Primärschlüssel besitzt, können die Regeln `Einfügen oder Aktualisieren` und `Einfügen ignorieren bei Duplikat` nicht angewendet werden.
|
||||
- Die Regeln `Einfügen oder Aktualisieren` und `Einfügen ignorieren bei Duplikat` nutzen den Primärschlüssel, um festzustellen, ob ein Datensatz bereits existiert.
|
||||
- Überschreiben synchronisiert auch Änderungen an der Tabellenstruktur.
|
||||
- Benutzerdefinierte Geschäftsdaten-Tabellen verwenden in der Regel Nur Struktur, um Produktionsdaten nicht zu überschreiben.
|
||||
|
||||
### Detailliertes Design
|
||||
|
||||
@@ -44,6 +43,8 @@ Der Migrations-Manager kann alle Tabellen in der Hauptdatenbank migrieren. Dabei
|
||||
|
||||
Migrationsregeln konfigurieren
|
||||
|
||||
Weitere Informationen zu Tabellen und Standardstrategien: [Integrierte Tabellen von Anwendungen und wichtigen Plugins](./built-in-tables.md).
|
||||
|
||||

|
||||
|
||||
Unabhängige Regeln aktivieren
|
||||
|
||||
@@ -1,52 +1,89 @@
|
||||
# Freigabemanagement
|
||||
---
|
||||
title: "Release-Management"
|
||||
description: "Best Practices für das Release im Betrieb: Versionierung, Multi-App, Backup-Verwaltung und Migrationsverwaltung für Entwicklung, Staging und Produktion."
|
||||
keywords: "Release-Management,Release,Versionsverwaltung,Multi-App,Backup-Verwaltung,Migrationsverwaltung,NocoBase"
|
||||
---
|
||||
|
||||
# Release-Management
|
||||
|
||||
## Einführung
|
||||
|
||||
In der Praxis werden, um die Datensicherheit und die Stabilität von Anwendungen zu gewährleisten, üblicherweise mehrere Umgebungen bereitgestellt, wie zum Beispiel eine Entwicklungsumgebung, eine Vorproduktionsumgebung und eine Produktionsumgebung. Dieses Dokument stellt zwei gängige No-Code-Entwicklungsprozesse vor und erläutert detailliert, wie Sie das Freigabemanagement in NocoBase umsetzen können.
|
||||
Release-Management beschreibt einen wiederholbaren, prüfbaren und wiederherstellbaren Weg von Entwicklung nach Produktion. Änderungen werden zuerst in der Entwicklungsumgebung abgeschlossen, danach in Staging geprüft und erst anschließend in Produktion veröffentlicht. Migrationsdateien, Backups, Ausführungsprotokolle und Prüfergebnisse sollten für Fehleranalyse und Rollback aufbewahrt werden.
|
||||
|
||||
## Installation
|
||||
~~~text
|
||||
Entwicklungsumgebung -> Staging-Umgebung -> Produktionsumgebung
|
||||
~~~
|
||||
|
||||
Für das Freigabemanagement sind drei Plugins unerlässlich. Bitte stellen Sie sicher, dass die folgenden Plugins aktiviert sind.
|
||||
## Release-Modell
|
||||
|
||||
### Variablen und Schlüssel
|
||||
| Fähigkeit | Zweck | Phase |
|
||||
| --- | --- | --- |
|
||||
| Versionsverwaltung | Entwicklungsstände und Rücksprungpunkte sichern | Entwicklung |
|
||||
| Variablen und Secrets | Umgebungsspezifische Werte und sensible Daten trennen | Alle Umgebungen |
|
||||
| Multi-App | Geschäftsgrenzen und Release-Auswirkungen kontrollieren | Architektur und Teamarbeit |
|
||||
| Backup-Verwaltung | Wiederherstellbaren Produktionszustand sichern | Vor Release und Betrieb |
|
||||
| Migrationsverwaltung | Konfiguration und Struktur in Zielumgebungen veröffentlichen | Staging und Produktion |
|
||||
|
||||
- Integriertes Plugin, standardmäßig installiert und aktiviert.
|
||||
- Es ermöglicht die zentrale Konfiguration und Verwaltung von Umgebungsvariablen und Schlüsseln. Dies wird für die Speicherung sensibler Daten, die Wiederverwendung von Konfigurationsdaten und die Isolierung von Umgebungskonfigurationen genutzt. ([Dokumentation ansehen](#))
|
||||
## Umgebungskonfiguration: Variablen und Secrets
|
||||
|
||||
### Backup-Manager
|
||||
Datenbankverbindungen, Drittanbieter-URLs, Testkonten, Tokens, API Keys und Webhooks sollten nicht fest in Seiten, Workflows oder Plugin-Konfigurationen stehen. Verwenden Sie Variablen und Secrets pro Umgebung. Beim Migrieren werden nur fehlende Werte der Zielumgebung ergänzt.
|
||||
|
||||
- Dieses Plugin ist nur in der Professional Edition oder höheren Versionen verfügbar ([Mehr erfahren](https://www.nocobase.com/en/commercial)).
|
||||
- Es bietet Funktionen für Sicherung und Wiederherstellung, einschließlich geplanter Backups, um Datensicherheit und schnelle Wiederherstellung zu gewährleisten. ([Dokumentation ansehen](../backup-manager/index.mdx))
|
||||
Verwandte Dokumentation: [Variablen und Secrets](../variables-and-secrets/index.md).
|
||||
|
||||
### Migrations-Manager
|
||||
## Entwicklung: Wiederherstellbare Punkte festhalten
|
||||
|
||||
- Dieses Plugin ist nur in der Professional Edition oder höheren Versionen verfügbar ([Mehr erfahren](https://www.nocobase.com/en/commercial)).
|
||||
- Es wird verwendet, um Anwendungskonfigurationen von einer Anwendungsumgebung in eine andere zu migrieren. ([Dokumentation ansehen](../migration-manager/index.md))
|
||||
Nutzen Sie Versionsverwaltung für größere Anpassungen an Datenmodellen, Seiten, Berechtigungen, Workflows und Plugins. Beschreibungen sollten den fachlichen Zweck nennen. Für die Veröffentlichung selbst verwenden Sie die Migrationsverwaltung; für Produktionswiederherstellung die Backup-Verwaltung.
|
||||
|
||||
## Gängige No-Code-Entwicklungsprozesse
|
||||
Verwandte Dokumentation: [Versionsverwaltung](../version-control/index.md).
|
||||
|
||||
### Einzelne Entwicklungsumgebung, unidirektionale Freigabe
|
||||
## Modulaufteilung: Release-Grenzen kontrollieren
|
||||
|
||||
Dieser Ansatz eignet sich für einfache Entwicklungsprozesse. Es gibt jeweils eine Entwicklungsumgebung, eine Vorproduktionsumgebung und eine Produktionsumgebung. Änderungen werden nacheinander von der Entwicklungsumgebung in die Vorproduktionsumgebung und schließlich in die Produktionsumgebung überführt. In diesem Prozess können Konfigurationen nur in der Entwicklungsumgebung geändert werden; weder die Vorproduktions- noch die Produktionsumgebung erlauben Änderungen.
|
||||
Kleine Systeme können mit einer Anwendung starten. Bei wachsender Komplexität sollten CRM, Tickets, Assets, HR, Reporting oder Operations-Backend als getrennte Anwendungen geplant werden. Klären Sie vorher Benutzer, Organisation, Authentifizierung, Berechtigungen und gemeinsam genutzte Daten.
|
||||
|
||||
~~~text
|
||||
CRM-App: Entwicklung -> Staging -> Produktion
|
||||
Ticket-App: Entwicklung -> Staging -> Produktion
|
||||
Asset-App: Entwicklung -> Staging -> Produktion
|
||||
~~~
|
||||
|
||||
Verwandte Dokumentation: [Multi-App-Verwaltung](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Vorbereitung: Wiederherstellung prüfen
|
||||
|
||||
Erstellen Sie vor Produktionsreleases ein Backup. Wichtige Releases sollten die Wiederherstellung in einer unabhängigen Umgebung testen. Das Backup muss Datenbank, Uploads und benötigte Speicherinhalte abdecken.
|
||||
|
||||
Verwandte Dokumentation: [Backup-Verwaltung](../backup-manager/index.mdx).
|
||||
|
||||
## Release-Ausführung: In die Zielumgebung migrieren
|
||||
|
||||
Veröffentlichen Sie zuerst nach Staging. Ist die Prüfung erfolgreich, verwenden Sie dieselbe Migrationsdatei für Produktion. Staging sollte Core-Version, Plugins, Variablen, Secrets, Berechtigungen und externe Verbindungen möglichst wie Produktion abbilden.
|
||||
|
||||

|
||||
|
||||
Beim Konfigurieren der Migrationsregeln wählen Sie für die integrierten Tabellen des Kerns und der Plugins die Regel „Überschreiben bevorzugen“. Für alle anderen können Sie die Standardeinstellungen beibehalten, sofern keine besonderen Anforderungen bestehen.
|
||||
|
||||

|
||||
|
||||
### Mehrere Entwicklungsumgebungen, zusammengeführte Freigabe
|
||||

|
||||
|
||||
Dieser Ansatz eignet sich für die Zusammenarbeit mehrerer Personen oder für komplexe Projekte. Mehrere parallele Entwicklungsumgebungen können unabhängig voneinander genutzt werden, und alle Änderungen werden in einer einzigen Vorproduktionsumgebung für Tests und Validierungen zusammengeführt, bevor sie in die Produktion überführt werden. Auch in diesem Prozess können Konfigurationen nur in der Entwicklungsumgebung geändert werden; weder die Vorproduktions- noch die Produktionsumgebung erlauben Änderungen.
|
||||
### Produktion
|
||||
|
||||

|
||||
Planen Sie ein Wartungsfenster, informieren Sie Benutzer und stoppen Sie Zugriffe oder schalten Sie eine Wartungsseite. Bei Multi-Node-Betrieb skalieren Sie vor der Migration auf einen Knoten. Nach der Migration prüfen Sie Kernprozesse und stellen den Zugriff wieder her.
|
||||
|
||||
Beim Konfigurieren der Migrationsregeln wählen Sie für die integrierten Tabellen des Kerns und der Plugins die Regel „Einfügen oder Aktualisieren bevorzugen“. Für alle anderen können Sie die Standardeinstellungen beibehalten, sofern keine besonderen Anforderungen bestehen.
|
||||
### Migrationsregeln
|
||||
|
||||

|
||||
Übliche Strategien sind Überschreiben, Nur Struktur und Überspringen. Integrierte Anwendungs- und Plugin-Tabellen folgen meist der Standardstrategie. Benutzerdefinierte Tabellen mit echten Geschäftsdaten sollten in der Regel nur die Struktur migrieren. Metadaten-Tabellen können je nach Szenario überschrieben werden.
|
||||
|
||||
## Rollback
|
||||
Weitere Informationen: [Integrierte Tabellen von Anwendungen und wichtigen Plugins](../migration-manager/built-in-tables.md).
|
||||
|
||||
Vor der Ausführung einer Migration erstellt das System automatisch ein Backup der aktuellen Anwendung. Sollte die Migration fehlschlagen oder die Ergebnisse nicht den Erwartungen entsprechen, können Sie über den [Backup-Manager](../backup-manager/index.mdx) ein Rollback durchführen und den vorherigen Zustand wiederherstellen.
|
||||
Verwandte Dokumentation: [Migrationsverwaltung](../migration-manager/index.md).
|
||||
|
||||

|
||||
## Rollback und Wiederherstellung
|
||||
|
||||
Bei Fehlern verwenden Sie zuerst das Backup vor dem Release. Wenn die aktuelle Umgebung noch stabil genug ist, kann dort wiederhergestellt werden. Andernfalls stellen Sie in einer unabhängigen Umgebung wieder her, prüfen Kernprozesse und schalten den Traffic um.
|
||||
|
||||
## Verwandte Dokumentation
|
||||
|
||||
- [Variablen und Secrets](../variables-and-secrets/index.md)
|
||||
- [Versionsverwaltung](../version-control/index.md)
|
||||
- [Multi-App-Verwaltung](../../multi-app/multi-app/index.md)
|
||||
- [Backup-Verwaltung](../backup-manager/index.mdx)
|
||||
- [Migrationsverwaltung](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Migration Manager",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Built-in tables for applications and major plugins",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,12 +10,18 @@ The NocoBase backup manager plugin provides features for fully backing up of the
|
||||
|
||||
## Install Database Client
|
||||
|
||||
The Backup Manager depends on the client for the corresponding database. Before use, please visit the official website to download the client that matches your database version:
|
||||
Backup Manager depends on the database client for the primary database. Before use, confirm that the current runtime environment has a client that matches your database version.
|
||||
|
||||
:::tip
|
||||
When installing NocoBase with Docker, use the corresponding `full` image when possible, such as `latest-full`, `beta-full`, or `alpha-full`. These images already include common database clients, so manual installation is usually not required.
|
||||
:::
|
||||
|
||||
If the current environment does not have the required database client, download the client that matches your database version from the official website:
|
||||
|
||||
- MySQL: https://dev.mysql.com/downloads/
|
||||
- PostgreSQL: https://www.postgresql.org/download/
|
||||
|
||||
For Docker versions, you can directly write a script in the `./storage/scripts` directory
|
||||
If you need to install it manually in a Docker environment, you can write a script in the `./storage/scripts` directory:
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Built-in tables for applications and major plugins"
|
||||
description: "Reference for built-in tables of applications and major plugins, covering Migration Manager default strategies, version-control scope, and backup/restore handling."
|
||||
keywords: "Migration Manager,version control,backup restore,built-in tables,application configuration,plugin configuration,dataCategory,overwrite,schema-only,skip,NocoBase"
|
||||
---
|
||||
|
||||
# Built-in tables for applications and major plugins
|
||||
|
||||
## Introduction
|
||||
|
||||
This list explains common handling for built-in tables of applications and major plugins in Migration Manager, version control, and backup/restore. In most cases, users do not need to adjust tables one by one. Use the default strategy.
|
||||
|
||||
These mechanisms focus on different concerns:
|
||||
|
||||
- **Migration Manager**: publishes across environments. Common strategies include overwrite, schema-only, and skip.
|
||||
- **Version control**: saves and restores key checkpoints during application building.
|
||||
- **Backup/restore**: backs up and restores the application runtime state.
|
||||
|
||||
The “Data type” column comes from built-in classification. System base data participates in version control; business runtime data does not; runtime temporary data is not backed up.
|
||||
|
||||
## Built-in table reference
|
||||
|
||||
### Database
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | System base data | Schema-only | Included | Backed up |
|
||||
|
||||
### Server
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | System base data | Overwrite | Included | Backed up |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | System base data | Schema-only | Included | Backed up |
|
||||
|
||||
### System settings
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Client
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `spacesUsers` | Membership between users and spaces | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | System base data | Overwrite | Included | Backed up |
|
||||
| `collections` | Business collection fields, indexes, and metadata | System base data | Overwrite | Included | Backed up |
|
||||
| `fields` | Field types and constraints under collections | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | System base data | Overwrite | Included | Backed up |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | System base data | Overwrite | Included | Backed up |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | System base data | Overwrite | Included | Backed up |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | System base data | Overwrite | Included | Backed up |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | System base data | Overwrite | Included | Backed up |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### China region field
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | System base data | Overwrite | Included | Backed up |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | System base data | Overwrite | Included | Backed up |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | System base data | Overwrite | Included | Backed up |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | System base data | Overwrite | Included | Backed up |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | System base data | Overwrite | Included | Backed up |
|
||||
| `flowModels` | Model definitions for the modern flow engine | System base data | Overwrite | Included | Backed up |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | System base data | Overwrite | Included | Backed up |
|
||||
| `blockTemplates` | Reusable UI block definitions | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Map block
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### ACL
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | System base data | Overwrite | Included | Backed up |
|
||||
| `rolesResources` | Resources granted to roles | System base data | Overwrite | Included | Backed up |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | System base data | Overwrite | Included | Backed up |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | System base data | Overwrite | Included | Backed up |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | System base data | Overwrite | Included | Backed up |
|
||||
| `issuedTokens` | Issued login or API access tokens | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### API keys
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | System base data | Overwrite | Included | Backed up |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Users
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Departments
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Business runtime data | Overwrite | Not included | Backed up |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Business runtime data | Overwrite | Not included | Backed up |
|
||||
| `departmentsUsers` | Relationships between users and departments | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `userDataSyncTasks` | Synchronization task records | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | System base data | Overwrite | Included | Backed up |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `jobs` | Execution result of each node in a workflow run | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Business runtime data | Overwrite | Not included | Backed up |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Business runtime data | Overwrite | Not included | Backed up |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Business runtime data | Overwrite | Not included | Backed up |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `approvals` | Approval-flow templates and step configuration | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | System base data | Overwrite | Included | Backed up |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Verification
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | System base data | Overwrite | Included | Backed up |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | System base data | Overwrite | Included | Backed up |
|
||||
| `mailSettings` | Mail plugin switches and parameters | System base data | Overwrite | Included | Backed up |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Business runtime data | Overwrite | Not included | Backed up |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `mailMessageLabels` | Mail category label definitions | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### AI
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `aiSettings` | AI basic settings | System base data | Overwrite | Included | Backed up |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | System base data | Overwrite | Included | Backed up |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `aiMessages` | User and assistant messages in conversations | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Runtime temporary data | Schema-only | Not included | Not backed up |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Runtime temporary data | Schema-only | Not included | Not backed up |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Runtime temporary data | Schema-only | Not included | Not backed up |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | System base data | Schema-only | Included | Backed up |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | System base data | Schema-only | Included | Backed up |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Business runtime data | Overwrite | Not included | Backed up |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Record history
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | System base data | Overwrite | Included | Backed up |
|
||||
| `recordHistoryFields` | Fields that need history records | System base data | Overwrite | Included | Backed up |
|
||||
| `recordHistoryTemplate` | Display template for history records | System base data | Overwrite | Included | Backed up |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Business runtime data | Schema-only | Not included | Backed up |
|
||||
| `recordHistories` | Versioned change records for entire records | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### File manager
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `attachments` | File attachment metadata associated with business records | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Localization
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | System base data | Overwrite | Included | Backed up |
|
||||
| `localizationTranslations` | Actual translated content for each language | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Business runtime data | Schema-only | Not included | Backed up |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | System base data | Overwrite | Included | Backed up |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Table | Description | Data type | Default migration strategy | Version control | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | System base data | Overwrite | Included | Backed up |
|
||||
|
||||
## User-defined tables
|
||||
|
||||
User-defined tables are treated as business data by default. In most cases, migrate only the table structure and choose schema-only.
|
||||
|
||||
If a user-defined table stores business configuration, categories, templates, rules, or other metadata, and those records should be synchronized from development to staging or production with the release, choose overwrite based on the business scenario.
|
||||
|
||||
If a user-defined table stores runtime data such as customers, orders, tickets, approval records, messages, or logs, avoid overwriting production records.
|
||||
@@ -1,5 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Migration Manager"
|
||||
description: "Operations migration: migrate application configuration from one environment to another, with schema-only, overwrite, and skip rules. Depends on Backup Manager."
|
||||
keywords: "Migration Manager,Migration,application configuration migration,migration rules,schema-only,overwrite,skip,database migration,operations,NocoBase"
|
||||
---
|
||||
|
||||
# Migration Manager
|
||||
@@ -26,17 +29,15 @@ The Migration Manager transfers tables and data from the primary database based
|
||||
|
||||
### Built-in Rules
|
||||
|
||||
Migration Manager supports five built-in rules:
|
||||
Migration Manager supports the following three rules:
|
||||
|
||||
- **Schema-only:** Only migrates the structure—no data is moved.
|
||||
- **Overwrite:** Deletes target table records, then inserts new data.
|
||||
- **Upsert:** Updates existing records (by primary key) or inserts new ones.
|
||||
- **Insert-ignore:** Inserts new records; skips existing ones.
|
||||
- **Skip:** No changes to the table.
|
||||
- **Schema-only:** Only synchronizes table structures. No data is inserted or updated.
|
||||
- **Overwrite:** Clears existing table records, then inserts new data.
|
||||
- **Skip:** Does nothing to the table.
|
||||
|
||||
**Additional notes:**
|
||||
- "Overwrite," "Upsert," and "Insert-ignore" all synchronize table structure changes.
|
||||
- Tables with auto-increment IDs or no primary keys do not support "Upsert" or "Insert-ignore."
|
||||
**Notes:**
|
||||
- Overwrite also synchronizes table-structure changes.
|
||||
- User-defined business data tables usually use schema-only to avoid overwriting production business data.
|
||||
|
||||
### Detailed Design
|
||||
|
||||
@@ -46,6 +47,8 @@ Migration Manager supports five built-in rules:
|
||||
|
||||
Configure migration rules
|
||||
|
||||
For the tables behind default strategies, see: [Built-in tables for applications and major plugins](./built-in-tables.md).
|
||||
|
||||

|
||||
|
||||
Enable independent rules
|
||||
|
||||
@@ -1,52 +1,139 @@
|
||||
---
|
||||
title: "Release Management"
|
||||
description: "Operations release best practices: use version control to record development checkpoints, multi-app architecture to split business modules, Backup Manager for disaster recovery, and Migration Manager to publish across development, staging, and production environments."
|
||||
keywords: "Release Management,Release,multi-environment deployment,version control,multi-app,Backup Manager,Migration Manager,development staging production,NocoBase"
|
||||
---
|
||||
|
||||
# Release Management
|
||||
|
||||
## Introduction
|
||||
|
||||
In real-world applications, to ensure data security and application stability, multiple environments are typically deployed, such as a development environment, a pre-release environment, and a production environment. This document provides examples of two common no-code development processes and explains in detail how to implement release management in NocoBase.
|
||||
Release management standardizes how an application moves from development to production. It is not a single operation. It is a repeatable, verifiable, and recoverable release process.
|
||||
|
||||
## Installation
|
||||
Keep production stable. Complete configuration changes in development first, validate them in staging, then publish them to production. Migration files, backups, execution logs, and validation results generated during release should be retained for troubleshooting and rollback.
|
||||
|
||||
Three plugins are essential for release management. Please ensure all of the following plugins are activated.
|
||||
Recommended environments:
|
||||
|
||||
### Environment Variables
|
||||
```text
|
||||
Development environment -> Staging environment -> Production environment
|
||||
```
|
||||
|
||||
- Built-in plugin, installed and activated by default.
|
||||
- Provides centralized configuration and management of environment variables and keys, used for sensitive data storage, reusable configuration data, environment-based isolation, etc. ([View Documentation](../variables-and-secrets/index.md)).
|
||||
Development is used for configuration and adjustment. Staging restores production constraints and validates the release result. Production carries real business traffic. Clear responsibilities make the release process easier to manage.
|
||||
|
||||
### Backup Manager
|
||||
## Release Model
|
||||
|
||||
- Available only in the Professional edition or higher ([Learn more](https://www.nocobase.com/en/commercial)).
|
||||
- Supports backup and restoration, including scheduled backups, ensuring data security and quick recovery. ([View Documentation](../backup-manager/index.mdx)).
|
||||
NocoBase release management usually combines five capabilities.
|
||||
|
||||
### Migration Manager
|
||||
| Capability | Problem solved | Stage |
|
||||
| --- | --- | --- |
|
||||
| Version control | Saves key checkpoints during development and provides rollback points for configuration changes | Development |
|
||||
| Variables and secrets | Isolates environment-specific configuration and sensitive information | Development, staging, and production release |
|
||||
| Multi-app | Splits system boundaries by business module and reduces release impact between modules | Architecture planning and team collaboration |
|
||||
| Backup Manager | Saves a recoverable production state for release failures and daily incidents | Before release and daily disaster recovery |
|
||||
| Migration Manager | Publishes configuration and structure changes to the target environment | Staging and production release |
|
||||
|
||||
- Available only in the Professional edition or higher ([Learn more](https://www.nocobase.com/en/commercial)).
|
||||
- Used to migrate application configurations from one application environment to another ([View Documentation](../migration-manager/index.md)).
|
||||
## Environment Configuration: Use Variables and Secrets
|
||||
|
||||
## Common No-Code Development Processes
|
||||
Variables and secrets isolate environment-specific configuration and sensitive information. Development, staging, and production should use their own variables and secrets.
|
||||
|
||||
### Single Development Environment, One-Way Release
|
||||
Identify environment-related configuration during development. Database connections, third-party service addresses, test accounts, access tokens, API keys, and webhook URLs should not be hardcoded in pages, workflows, or plugin settings. Reference them through variables and secrets whenever possible. When migrating to staging or production, you only need to complete missing target-environment values as prompted, and production secrets will not be written into migration content.
|
||||
|
||||
This approach suits simple development processes. There is one development environment, one pre-release environment, and one production environment. Changes flow from the development environment to the pre-release environment and are finally deployed to the production environment. In this process, only the development environment can modify configurations—neither the pre-release nor the production environment allows modifications.
|
||||
Related documentation: [Variables and Secrets](../variables-and-secrets/index.md).
|
||||
|
||||
## Development Stage: Record Recoverable Checkpoints
|
||||
|
||||
Development changes frequently. Use version control to save key checkpoints. Before a major configuration change, create a version. After adjusting data models, pages, permissions, workflows, or plugin settings, create another version.
|
||||
|
||||
Write version descriptions with clear business meaning. For example, “adjust customer follow-up page and field permissions,” “add ticket escalation workflow,” or “optimize asset request approval flow.” Clear descriptions make later validation, comparison, and recovery easier.
|
||||
|
||||
Version control mainly serves the development process. It is suitable for undoing a configuration change or preserving a milestone. After entering the release stage, synchronize configuration changes through Migration Manager. Use Backup Manager when production needs recovery.
|
||||
|
||||
Related documentation: [Version control](../version-control/index.md).
|
||||
|
||||
## Module Splitting: Control Release Boundaries
|
||||
|
||||
For small systems, start with a single app. A single app is simple to deploy and works well for prototypes, small internal systems, and early-stage projects.
|
||||
|
||||
As business complexity grows, one app may contain more pages, tables, permissions, and workflows. One configuration change may affect several teams. One release may involve several modules. At that point, consider splitting business boundaries with multi-app architecture.
|
||||
|
||||
Multi-app works well when split by business responsibility, such as CRM, tickets, assets, HR, reports, and operations backend. Each app can be developed, tested, released, and rolled back independently. High-change modules, high-risk modules, and modules serving different user groups are often better separated.
|
||||
|
||||
Plan shared capabilities before splitting. Users, organizations, authentication, permissions, and cross-app shared data all affect later release methods. Clearer boundaries make release impact easier to control.
|
||||
|
||||
A split release chain usually looks like this:
|
||||
|
||||
```text
|
||||
CRM app: Development environment -> Staging environment -> Production environment
|
||||
Ticket app: Development environment -> Staging environment -> Production environment
|
||||
Asset app: Development environment -> Staging environment -> Production environment
|
||||
```
|
||||
|
||||
Related documentation: [Multi-app management](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Pre-release Preparation: Confirm Recovery Capability
|
||||
|
||||
Backup is the safety baseline for production release. Create a pre-release backup before publishing to production. For important releases, verify that the backup can be restored in an independent environment.
|
||||
|
||||
Pre-release backups and scheduled daily backups serve different purposes. Scheduled backups handle misoperation, data corruption, and infrastructure failures. Pre-release backups support quick recovery after release failure. Both should be part of the production operations strategy.
|
||||
|
||||
Before release, confirm that the backup task has completed and that the backup file can be downloaded or accessed. For important releases, perform a restore verification in an independent environment.
|
||||
|
||||
Backups should cover the database, user-uploaded files, and storage content required by the application runtime. Database-only records are not enough for full recovery.
|
||||
|
||||
Related documentation: [Backup Manager](../backup-manager/index.mdx).
|
||||
|
||||
## Release Execution: Migrate to the Target Environment
|
||||
|
||||
Migration Manager publishes application configuration from one environment to another. Common migration content includes application configuration, table structures, plugin configuration, and some data that needs to be migrated.
|
||||
|
||||
Publish to staging first. After the migration file passes staging validation, use the same file for production release.
|
||||
|
||||

|
||||
|
||||
When configuring migration rules, select **“Overwrite”** for built-in tables in the core and plugins if needed; for all others, you can keep the default settings if there are no special requirements.
|
||||
### Publish to Staging
|
||||
|
||||
After generating a migration file from development, execute it in staging first. Staging should be as close to production as possible, including core version, plugin versions, variables, secrets, permission configuration, and external-system connection methods. After execution, validate core pages, permission rules, workflows, and external integrations.
|
||||
|
||||
After staging validation passes, keep the same migration file for production release. Do not modify the migration file right before production. If changes are needed, go back to development, regenerate the file, and validate it again in staging.
|
||||
|
||||
### Publish to Production
|
||||
|
||||
Schedule a maintenance window for production release. Notify users before the release, stop user access or switch to a maintenance page, and avoid new business data writes during migration. In cluster or multi-node deployments, scale the application down to one node before migration.
|
||||
|
||||
After confirming that the pre-release backup has completed, execute the migration file that passed staging validation. After migration, validate core business flows first, then restore user access. In multi-node deployments, restore the node count after validation passes.
|
||||
|
||||
Migration files, backups, and execution logs are stored in their respective features. Internal release records can add release time, executor, validation result, and backup information for later troubleshooting and rollback.
|
||||
|
||||
### Migration Rules
|
||||
|
||||
Migration rules decide how tables and records are handled in the target environment. Common strategies include overwrite, schema-only, and skip. Before configuring rules, first distinguish application and plugin built-in tables from user-defined tables.
|
||||
|
||||
Application and plugin built-in tables usually follow the default strategy and use overwrite first. Examples include pages, menus, blocks, permissions, and workflows. During release, development configuration is usually treated as the source of truth and synchronized to staging and production.
|
||||
|
||||
User-defined tables should be judged by business purpose. Tables that carry real business data usually migrate structure only and use schema-only, avoiding overwrites of production data. Some user-defined tables that store metadata such as configuration, categories, templates, or rules can use overwrite depending on the business scenario.
|
||||
|
||||
For the tables behind default strategies, see [Built-in tables for applications and major plugins](../migration-manager/built-in-tables.md).
|
||||
|
||||

|
||||
|
||||
### Multiple Development Environments, Merged Release
|
||||
Migration Manager mainly handles application configuration and data in the main database. External data sources, sub-app data, and some storage-directory content should be handled separately according to the actual situation.
|
||||
|
||||
This approach suits multi-person collaboration or complex projects. Several parallel development environments can be used independently, and all changes are merged into a single pre-release environment for testing and verification before being deployed to production. In this process, only the development environment can modify configurations—neither the pre-release nor the production environment allows modifications.
|
||||
Related documentation: [Migration Manager](../migration-manager/index.md).
|
||||
|
||||

|
||||
## Rollback and Recovery
|
||||
|
||||
When configuring migration rules, select **“Insert or Update”** for built-in tables in the core and plugins if needed; for all others, you can keep the default settings if there are no special requirements.
|
||||
When a release fails, first use the pre-release backup through the Backup Manager plugin. Before restoring, confirm that the backup file is available and follow the UI prompts to complete restoration.
|
||||
|
||||

|
||||
If the current production environment can still access Backup Manager and only the migration execution failed, restore the pre-release backup directly in the current environment. After recovery, record the failure cause and handling result to avoid repeating the same issue in later releases.
|
||||
|
||||
## Rollback
|
||||
|
||||
Before executing a migration, the system automatically creates a backup of the current application. If the migration fails or the results are not as expected, you can roll back and restore via the [Backup Manager](../backup-manager/index.mdx).
|
||||
If the current environment is unstable, or you want to reduce the risk of repeated repair attempts in a faulty environment, prepare an independent environment and restore the pre-release backup there. After restoration, validate core business flows first, then switch traffic to the recovered environment.
|
||||
|
||||

|
||||
|
||||
## Related Documentation
|
||||
|
||||
- [Variables and Secrets](../variables-and-secrets/index.md)
|
||||
- [Version control](../version-control/index.md)
|
||||
- [Multi-app management](../../multi-app/multi-app/index.md)
|
||||
- [Backup Manager](../backup-manager/index.mdx)
|
||||
- [Migration Manager](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Gestión de migraciones",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Tablas integradas de aplicaciones y plugins principales",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,12 +11,18 @@ El plugin de gestión de copias de seguridad de NocoBase ofrece funcionalidades
|
||||
|
||||
## Instalar Cliente de Base de Datos
|
||||
|
||||
El gestor de copias de seguridad depende del cliente de la base de datos correspondiente. Antes de usarlo, por favor, visite el sitio web oficial para descargar el cliente que coincida con la versión de su base de datos:
|
||||
La gestión de copias de seguridad depende del cliente de base de datos de la base principal. Antes de usarla, confirme que el entorno de ejecución actual tenga un cliente compatible con la versión de su base de datos.
|
||||
|
||||
:::tip
|
||||
Si instala NocoBase con Docker, use preferentemente la imagen `full` correspondiente, por ejemplo `latest-full`, `beta-full` o `alpha-full`. Estas imágenes ya incluyen clientes de base de datos habituales, por lo que normalmente no requieren instalación manual.
|
||||
:::
|
||||
|
||||
Si el entorno actual no tiene el cliente de base de datos necesario, descargue desde el sitio oficial el cliente que coincida con su versión de base de datos:
|
||||
|
||||
- MySQL: https://dev.mysql.com/downloads/
|
||||
- PostgreSQL: https://www.postgresql.org/download/
|
||||
|
||||
Para las versiones de Docker, puede escribir un script directamente en el directorio `./storage/scripts`:
|
||||
Si necesita instalarlo manualmente en un entorno Docker, puede escribir un script en el directorio `./storage/scripts`:
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Tablas integradas de aplicaciones y plugins principales"
|
||||
description: "Referencia de tablas integradas, estrategias predeterminadas de migración, alcance del control de versiones y tratamiento de copias de seguridad/restauración."
|
||||
keywords: "migración,control de versiones,copia de seguridad,restauración,tablas integradas,NocoBase"
|
||||
---
|
||||
|
||||
# Tablas integradas de aplicaciones y plugins principales
|
||||
|
||||
## Introducción
|
||||
|
||||
Esta lista explica el tratamiento habitual de las tablas integradas de aplicaciones y plugins principales en migración, control de versiones y copia de seguridad/restauración. En la mayoría de los casos no es necesario ajustar tabla por tabla. Use la estrategia predeterminada.
|
||||
|
||||
Los mecanismos tienen enfoques diferentes:
|
||||
|
||||
- **Gestión de migraciones**: publica entre entornos. Las estrategias comunes son sobrescribir, solo estructura y omitir.
|
||||
- **Control de versiones**: guarda y restaura hitos clave durante la construcción de la aplicación.
|
||||
- **Copia de seguridad/restauración**: respalda y restaura el estado de ejecución de la aplicación.
|
||||
|
||||
La columna “Tipo de datos” proviene de la clasificación integrada. Los datos base del sistema participan en el control de versiones; los datos de ejecución de negocio no; los datos temporales de ejecución no se respaldan.
|
||||
|
||||
## Referencia de tablas integradas
|
||||
|
||||
### Database
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | Datos base del sistema | Solo estructura | Participa | Se respalda |
|
||||
|
||||
### Server
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | Datos base del sistema | Solo estructura | Participa | Se respalda |
|
||||
|
||||
### System settings
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Client
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `spacesUsers` | Membership between users and spaces | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `collections` | Business collection fields, indexes, and metadata | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `fields` | Field types and constraints under collections | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### China region field
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `flowModels` | Model definitions for the modern flow engine | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `blockTemplates` | Reusable UI block definitions | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Map block
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### ACL
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `rolesResources` | Resources granted to roles | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `issuedTokens` | Issued login or API access tokens | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### API keys
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Users
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Departments
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Datos de ejecución de negocio | Sobrescribir | No participa | Se respalda |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Datos de ejecución de negocio | Sobrescribir | No participa | Se respalda |
|
||||
| `departmentsUsers` | Relationships between users and departments | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `userDataSyncTasks` | Synchronization task records | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `jobs` | Execution result of each node in a workflow run | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Datos de ejecución de negocio | Sobrescribir | No participa | Se respalda |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Datos de ejecución de negocio | Sobrescribir | No participa | Se respalda |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Datos de ejecución de negocio | Sobrescribir | No participa | Se respalda |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `approvals` | Approval-flow templates and step configuration | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Verification
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `mailSettings` | Mail plugin switches and parameters | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Datos de ejecución de negocio | Sobrescribir | No participa | Se respalda |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `mailMessageLabels` | Mail category label definitions | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### AI
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `aiSettings` | AI basic settings | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `aiMessages` | User and assistant messages in conversations | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Datos temporales de ejecución | Solo estructura | No participa | No se respalda |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Datos temporales de ejecución | Solo estructura | No participa | No se respalda |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Datos temporales de ejecución | Solo estructura | No participa | No se respalda |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | Datos base del sistema | Solo estructura | Participa | Se respalda |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | Datos base del sistema | Solo estructura | Participa | Se respalda |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Datos de ejecución de negocio | Sobrescribir | No participa | Se respalda |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Record history
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `recordHistoryFields` | Fields that need history records | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `recordHistoryTemplate` | Display template for history records | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
| `recordHistories` | Versioned change records for entire records | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### File manager
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `attachments` | File attachment metadata associated with business records | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Localization
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `localizationTranslations` | Actual translated content for each language | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Datos de ejecución de negocio | Solo estructura | No participa | Se respalda |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Tabla | Descripción | Tipo de datos | Estrategia predeterminada | Control de versiones | Copia/restauración |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | Datos base del sistema | Sobrescribir | Participa | Se respalda |
|
||||
|
||||
## Tablas definidas por el usuario
|
||||
|
||||
Las tablas definidas por el usuario se tratan como datos de negocio por defecto. En la mayoría de los casos, migre solo la estructura y elija solo estructura.
|
||||
|
||||
Si almacenan configuración, categorías, plantillas, reglas u otros metadatos, puede usar sobrescribir según el escenario.
|
||||
|
||||
Si almacenan clientes, pedidos, tickets, aprobaciones, mensajes o logs, evite sobrescribir los registros de producción.
|
||||
@@ -1,5 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Gestión de migraciones"
|
||||
description: "Migración operativa: migra configuración de aplicación de un entorno a otro, con reglas de solo estructura, sobrescribir y omitir. Depende de la gestión de copias de seguridad."
|
||||
keywords: "Gestión de migraciones,Migration,migración de configuración,reglas de migración,solo estructura,sobrescribir,omitir,NocoBase"
|
||||
---
|
||||
|
||||
# Gestor de Migraciones
|
||||
@@ -20,21 +23,17 @@ El Gestor de Migraciones transfiere las tablas y los datos de la base de datos p
|
||||
|
||||
## Reglas de Migración
|
||||
|
||||
### Reglas Integradas
|
||||
### Reglas integradas
|
||||
|
||||
El Gestor de Migraciones puede migrar todas las tablas de la base de datos principal y actualmente admite las siguientes cinco reglas integradas:
|
||||
La gestión de migraciones admite las siguientes tres reglas:
|
||||
|
||||
- **Solo esquema**: Solo migra la estructura (esquema) de las tablas; no se insertan ni actualizan datos.
|
||||
- **Sobrescribir (vaciar y reinsertar)**: Elimina todos los registros existentes de la tabla de la base de datos de destino y luego inserta los nuevos datos.
|
||||
- **Upsert (Insertar o actualizar)**: Comprueba si cada registro existe (por clave primaria). Si existe, lo actualiza; si no, lo inserta.
|
||||
- **Ignorar inserción**: Inserta nuevos registros, pero si un registro ya existe (por clave primaria), la inserción se ignora (no se realizan actualizaciones).
|
||||
- **Omitir**: Omite completamente el procesamiento de la tabla (no hay cambios de estructura ni migración de datos).
|
||||
- **Solo estructura:** Sincroniza solo la estructura de la tabla. No inserta ni actualiza datos.
|
||||
- **Sobrescribir:** Borra los registros existentes de la tabla y luego inserta datos nuevos.
|
||||
- **Omitir:** No realiza ninguna operación sobre la tabla.
|
||||
|
||||
**Notas adicionales:**
|
||||
|
||||
- Las reglas "Sobrescribir", "Upsert" e "Ignorar inserción" también sincronizan los cambios en la estructura de la tabla.
|
||||
- Si una tabla utiliza un ID de auto-incremento como clave primaria, o si no tiene clave primaria, no se pueden aplicar las reglas "Upsert" ni "Ignorar inserción".
|
||||
- Las reglas "Upsert" e "Ignorar inserción" se basan en la clave primaria para determinar si el registro ya existe.
|
||||
**Notas:**
|
||||
- Sobrescribir también sincroniza cambios de estructura.
|
||||
- Las tablas de datos de negocio definidas por el usuario suelen usar solo estructura para evitar sobrescribir datos de producción.
|
||||
|
||||
### Diseño Detallado
|
||||
|
||||
|
||||
@@ -1,52 +1,103 @@
|
||||
# Gestión de Lanzamientos
|
||||
---
|
||||
title: "Gestión de publicaciones"
|
||||
description: "Buenas prácticas de publicación: usar control de versiones, multiaplicación, copias de seguridad y migración para publicar entre desarrollo, preproducción y producción."
|
||||
keywords: "Gestión de publicaciones,Release,despliegue multientorno,control de versiones,multiaplicación,copias de seguridad,migración,NocoBase"
|
||||
---
|
||||
|
||||
# Gestión de publicaciones
|
||||
|
||||
## Introducción
|
||||
|
||||
En aplicaciones reales, para garantizar la seguridad de los datos y la estabilidad de la aplicación, es habitual desplegar múltiples entornos, como un entorno de desarrollo, uno de pre-producción y uno de producción. Este documento le mostrará dos procesos comunes de desarrollo sin código y le explicará en detalle cómo implementar la gestión de lanzamientos en NocoBase.
|
||||
La gestión de publicaciones regula cómo una aplicación pasa de desarrollo a producción. No es una operación aislada, sino un proceso repetible, verificable y recuperable.
|
||||
|
||||
## Instalación
|
||||
Mantenga estable la producción. Complete los cambios en desarrollo, valídelos en preproducción y publíquelos después en producción. Conserve los archivos de migración, copias de seguridad, logs de ejecución y resultados de validación para diagnóstico y reversión.
|
||||
|
||||
Para la gestión de lanzamientos, son indispensables tres plugins. Asegúrese de que los siguientes plugins estén activados.
|
||||
~~~text
|
||||
Entorno de desarrollo -> Entorno de preproducción -> Entorno de producción
|
||||
~~~
|
||||
|
||||
### Variables y Claves de Entorno
|
||||
Desarrollo sirve para configurar y ajustar. Preproducción reproduce restricciones de producción y valida el resultado. Producción atiende el negocio real.
|
||||
|
||||
- Plugin integrado, instalado y activado por defecto.
|
||||
- Permite la configuración y gestión centralizada de variables y claves de entorno, utilizadas para el almacenamiento de datos sensibles, la reutilización de datos de configuración, el aislamiento de configuraciones por entorno, entre otros fines ([Ver Documentación](#)).
|
||||
## Modelo de publicación
|
||||
|
||||
### Gestor de Copias de Seguridad
|
||||
| Capacidad | Problema que resuelve | Etapa |
|
||||
| --- | --- | --- |
|
||||
| Control de versiones | Guarda hitos de desarrollo y puntos de recuperación | Desarrollo |
|
||||
| Variables y secretos | Aísla configuración y datos sensibles por entorno | Desarrollo, preproducción y producción |
|
||||
| Multiaplicación | Divide límites por módulo de negocio | Arquitectura y colaboración |
|
||||
| Copias de seguridad | Conserva un estado recuperable de producción | Antes de publicar y operación diaria |
|
||||
| Gestión de migraciones | Publica configuración y estructura al entorno destino | Preproducción y producción |
|
||||
|
||||
- Este plugin solo está disponible en la edición Profesional o superior ([Más información](https://www.nocobase.com/en/commercial)).
|
||||
- Ofrece funciones de copia de seguridad y restauración, incluyendo copias de seguridad programadas, garantizando la seguridad de los datos y una recuperación rápida ([Ver Documentación](../backup-manager/index.mdx)).
|
||||
## Configuración del entorno: usar variables y secretos
|
||||
|
||||
### Gestor de Migraciones
|
||||
Use variables y secretos diferentes en desarrollo, preproducción y producción. Conexiones de base de datos, URLs de servicios externos, cuentas de prueba, tokens, API Keys y Webhooks no deben quedar escritos en páginas, workflows ni configuración de plugins. Al migrar, complete solo los valores que falten en el entorno destino.
|
||||
|
||||
- Este plugin solo está disponible en la edición Profesional o superior ([Más información](https://www.nocobase.com/en/commercial)).
|
||||
- Se utiliza para migrar configuraciones de aplicaciones de un entorno de aplicación a otro ([Ver Documentación](../migration-manager/index.md)).
|
||||
Documentación relacionada: [Variables y secretos](../variables-and-secrets/index.md).
|
||||
|
||||
## Procesos Comunes de Desarrollo Sin Código
|
||||
## Etapa de desarrollo: registrar puntos recuperables
|
||||
|
||||
### Entorno de Desarrollo Único, Lanzamiento Unidireccional
|
||||
Use control de versiones para guardar puntos importantes. Cree una versión antes de cambios grandes y otra después de modificar modelos, páginas, permisos, workflows o plugins. Escriba descripciones con significado de negocio.
|
||||
|
||||
Este enfoque es adecuado para procesos de desarrollo sencillos. Hay un único entorno de desarrollo, uno de pre-producción y uno de producción. Los cambios fluyen desde el entorno de desarrollo hacia el de pre-producción y, finalmente, se despliegan en el entorno de producción. En este proceso, solo el entorno de desarrollo puede modificar las configuraciones; los entornos de pre-producción y producción no permiten modificaciones.
|
||||
El control de versiones sirve principalmente al desarrollo. En la publicación, sincronice cambios mediante migración. Para recuperar producción, use copias de seguridad.
|
||||
|
||||
Documentación relacionada: [Control de versiones](../version-control/index.md).
|
||||
|
||||
## División modular: controlar límites de publicación
|
||||
|
||||
Los sistemas pequeños pueden empezar con una sola aplicación. Cuando aumentan páginas, tablas, permisos y workflows, una publicación puede afectar a varios equipos. En ese caso, divida por módulos con multiaplicación: CRM, tickets, activos, HR, reportes u operaciones.
|
||||
|
||||
Planifique usuarios, organizaciones, autenticación, permisos y datos compartidos antes de dividir. Los límites claros reducen el impacto de cada publicación.
|
||||
|
||||
~~~text
|
||||
CRM: Desarrollo -> Preproducción -> Producción
|
||||
Tickets: Desarrollo -> Preproducción -> Producción
|
||||
Activos: Desarrollo -> Preproducción -> Producción
|
||||
~~~
|
||||
|
||||
Documentación relacionada: [Gestión multiaplicación](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Preparación previa: confirmar recuperación
|
||||
|
||||
Antes de publicar en producción, cree una copia de seguridad. En publicaciones importantes, pruebe la restauración en un entorno independiente. La copia debe cubrir base de datos, archivos subidos y contenido de storage necesario para ejecutar la aplicación.
|
||||
|
||||
Documentación relacionada: [Gestión de copias de seguridad](../backup-manager/index.mdx).
|
||||
|
||||
## Ejecución: migrar al entorno destino
|
||||
|
||||
La gestión de migraciones publica configuración, estructuras de tablas, configuración de plugins y algunos datos necesarios. Publique primero en preproducción; si la validación pasa, use el mismo archivo para producción.
|
||||
|
||||

|
||||
|
||||
Al configurar las reglas de migración, seleccione la regla **"Sobrescribir"** para las tablas integradas del núcleo y los plugins si es necesario; para todas las demás, puede mantener la configuración predeterminada si no hay requisitos especiales.
|
||||
### Publicar en preproducción
|
||||
|
||||
Ejecute allí el archivo generado desde desarrollo. Preproducción debe acercarse a producción en versión del núcleo, plugins, variables, secretos, permisos y conexiones externas. Valide páginas principales, permisos, workflows e integraciones.
|
||||
|
||||
### Publicar en producción
|
||||
|
||||
Reserve una ventana de mantenimiento, avise a los usuarios y detenga el acceso o muestre una página de mantenimiento. En despliegues multi-nodo, reduzca a un nodo antes de migrar. Tras la migración, valide procesos principales y restaure el acceso.
|
||||
|
||||
### Reglas de migración
|
||||
|
||||
Las reglas habituales son sobrescribir, solo estructura y omitir. Las tablas integradas de aplicación y plugins suelen seguir la estrategia predeterminada y usar sobrescritura. Las tablas definidas por el usuario con datos de negocio suelen usar solo estructura. Si guardan metadatos como configuraciones, categorías, plantillas o reglas, evalúe sobrescribir según el caso.
|
||||
|
||||
Consulte: [Tablas integradas de aplicaciones y plugins principales](../migration-manager/built-in-tables.md).
|
||||
|
||||

|
||||
|
||||
### Múltiples Entornos de Desarrollo, Lanzamiento Fusionado
|
||||
La migración trata principalmente la base de datos principal. Fuentes externas, datos de subaplicaciones y algunos directorios de storage deben gestionarse aparte.
|
||||
|
||||
Este enfoque es adecuado para la colaboración entre varias personas o para proyectos complejos. Varios entornos de desarrollo paralelos pueden utilizarse de forma independiente, y todos los cambios se fusionan en un único entorno de pre-producción para su prueba y verificación antes de ser desplegados en producción. En este proceso, también solo el entorno de desarrollo puede modificar las configuraciones; los entornos de pre-producción y producción no permiten modificaciones.
|
||||
Documentación relacionada: [Gestión de migraciones](../migration-manager/index.md).
|
||||
|
||||

|
||||
## Reversión y recuperación
|
||||
|
||||
Al configurar las reglas de migración, seleccione la regla **"Insertar o Actualizar"** para las tablas integradas del núcleo y los plugins si es necesario; para todas las demás, puede mantener la configuración predeterminada si no hay requisitos especiales.
|
||||
Si falla una publicación, use primero la copia previa mediante Backup Manager. Si la producción aún puede acceder a Backup Manager y solo falló la migración, restaure en el entorno actual. Si el entorno está inestable, restaure en un entorno independiente, valide procesos principales y cambie el tráfico.
|
||||
|
||||

|
||||

|
||||
|
||||
## Reversión
|
||||
## Documentación relacionada
|
||||
|
||||
Antes de ejecutar una migración, el sistema crea automáticamente una copia de seguridad de la aplicación actual. Si la migración falla o los resultados no son los esperados, puede realizar una reversión y restaurar a través del [Gestor de Copias de Seguridad](../backup-manager/index.mdx).
|
||||
|
||||

|
||||
- [Variables y secretos](../variables-and-secrets/index.md)
|
||||
- [Control de versiones](../version-control/index.md)
|
||||
- [Gestión multiaplicación](../../multi-app/multi-app/index.md)
|
||||
- [Gestión de copias de seguridad](../backup-manager/index.mdx)
|
||||
- [Gestión de migraciones](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Gestion des migrations",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Tables intégrées des applications et principaux plugins",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,12 +11,18 @@ Le plugin de gestion des sauvegardes NocoBase offre des fonctionnalités pour la
|
||||
|
||||
## Installation du client de base de données
|
||||
|
||||
Le Gestionnaire de sauvegardes dépend du client de la base de données correspondante. Avant de l'utiliser, veuillez visiter le site officiel pour télécharger le client correspondant à la version de votre base de données :
|
||||
La gestion des sauvegardes dépend du client de base de données de la base principale. Avant utilisation, vérifiez que l’environnement d’exécution contient un client compatible avec la version de votre base de données.
|
||||
|
||||
:::tip
|
||||
Si vous installez NocoBase avec Docker, utilisez de préférence l’image `full` correspondant à votre version, par exemple `latest-full`, `beta-full` ou `alpha-full`. Ces images incluent déjà les clients de base de données courants, ce qui évite généralement une installation manuelle.
|
||||
:::
|
||||
|
||||
Si l’environnement actuel ne dispose pas du client nécessaire, téléchargez depuis le site officiel le client correspondant à la version de votre base de données :
|
||||
|
||||
- MySQL : https://dev.mysql.com/downloads/
|
||||
- PostgreSQL : https://www.postgresql.org/download/
|
||||
|
||||
Pour les versions Docker, vous pouvez directement écrire un script dans le répertoire `./storage/scripts` :
|
||||
Si vous devez l’installer manuellement dans un environnement Docker, vous pouvez écrire un script dans le répertoire `./storage/scripts` :
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Tables intégrées des applications et principaux plugins"
|
||||
description: "Référence des tables intégrées, stratégies par défaut de migration, portée de gestion des versions et traitement sauvegarde/restauration."
|
||||
keywords: "migration,gestion des versions,sauvegarde,restauration,tables intégrées,NocoBase"
|
||||
---
|
||||
|
||||
# Tables intégrées des applications et principaux plugins
|
||||
|
||||
## Introduction
|
||||
|
||||
Cette liste décrit le traitement courant des tables intégrées des applications et principaux plugins dans la migration, la gestion des versions et la sauvegarde/restauration. Dans la plupart des cas, il n’est pas nécessaire d’ajuster les tables une par une. Utilisez la stratégie par défaut.
|
||||
|
||||
Les mécanismes répondent à des besoins différents :
|
||||
|
||||
- **Gestion des migrations**: publie entre environnements. Les stratégies courantes sont écraser, structure seule et ignorer.
|
||||
- **Gestion des versions**: enregistre et restaure les points clés pendant la construction de l’application.
|
||||
- **Sauvegarde/restauration**: sauvegarde et restaure l’état d’exécution de l’application.
|
||||
|
||||
La colonne « Type de données » provient de la classification intégrée. Les données de base système participent à la gestion des versions ; les données métier d’exécution non ; les données temporaires d’exécution ne sont pas sauvegardées.
|
||||
|
||||
## Référence des tables intégrées
|
||||
|
||||
### Database
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | Données de base système | Structure seule | Participe | Sauvegardé |
|
||||
|
||||
### Server
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | Données de base système | Structure seule | Participe | Sauvegardé |
|
||||
|
||||
### System settings
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Client
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `spacesUsers` | Membership between users and spaces | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `collections` | Business collection fields, indexes, and metadata | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `fields` | Field types and constraints under collections | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### China region field
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `flowModels` | Model definitions for the modern flow engine | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `blockTemplates` | Reusable UI block definitions | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Map block
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### ACL
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `rolesResources` | Resources granted to roles | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `issuedTokens` | Issued login or API access tokens | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### API keys
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Users
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Departments
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Données métier d’exécution | Écraser | Ne participe pas | Sauvegardé |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Données métier d’exécution | Écraser | Ne participe pas | Sauvegardé |
|
||||
| `departmentsUsers` | Relationships between users and departments | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `userDataSyncTasks` | Synchronization task records | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `jobs` | Execution result of each node in a workflow run | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Données métier d’exécution | Écraser | Ne participe pas | Sauvegardé |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Données métier d’exécution | Écraser | Ne participe pas | Sauvegardé |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Données métier d’exécution | Écraser | Ne participe pas | Sauvegardé |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `approvals` | Approval-flow templates and step configuration | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Verification
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `mailSettings` | Mail plugin switches and parameters | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Données métier d’exécution | Écraser | Ne participe pas | Sauvegardé |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `mailMessageLabels` | Mail category label definitions | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### AI
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `aiSettings` | AI basic settings | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `aiMessages` | User and assistant messages in conversations | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Données temporaires d’exécution | Structure seule | Ne participe pas | Non sauvegardé |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Données temporaires d’exécution | Structure seule | Ne participe pas | Non sauvegardé |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Données temporaires d’exécution | Structure seule | Ne participe pas | Non sauvegardé |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | Données de base système | Structure seule | Participe | Sauvegardé |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | Données de base système | Structure seule | Participe | Sauvegardé |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Données métier d’exécution | Écraser | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Record history
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `recordHistoryFields` | Fields that need history records | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `recordHistoryTemplate` | Display template for history records | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
| `recordHistories` | Versioned change records for entire records | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### File manager
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `attachments` | File attachment metadata associated with business records | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Localization
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `localizationTranslations` | Actual translated content for each language | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Données métier d’exécution | Structure seule | Ne participe pas | Sauvegardé |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Table | Description | Type de données | Stratégie par défaut | Gestion des versions | Sauvegarde/restauration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | Données de base système | Écraser | Participe | Sauvegardé |
|
||||
|
||||
## Tables définies par l’utilisateur
|
||||
|
||||
Les tables définies par l’utilisateur sont traitées par défaut comme des données métier. Dans la plupart des cas, migrez seulement la structure.
|
||||
|
||||
Si elles stockent des configurations, catégories, modèles, règles ou métadonnées, choisissez écraser selon le scénario.
|
||||
|
||||
Si elles stockent clients, commandes, tickets, approbations, messages ou journaux, évitez d’écraser la production.
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Gestionnaire de migrations"
|
||||
description: "Gestionnaire de migrations en exploitation : migration de la configuration applicative d'un environnement vers un autre, prise en charge des règles structure seule, écraser, Upsert, ignorer les doublons, ignorer ; dépend du plugin Gestionnaire de sauvegardes."
|
||||
keywords: "Gestionnaire de migrations,Migration,migration de configuration,règles de migration,Upsert,migration de base de données,exploitation,NocoBase"
|
||||
title: "Gestion des migrations"
|
||||
description: "Migration opérationnelle : migrer la configuration d’une application d’un environnement à un autre, avec les règles structure seule, écraser et ignorer. Dépend de la gestion des sauvegardes."
|
||||
keywords: "Gestion des migrations,Migration,configuration application,règles de migration,structure seule,écraser,ignorer,NocoBase"
|
||||
---
|
||||
# Gestionnaire de migrations
|
||||
|
||||
@@ -29,17 +29,15 @@ Migre les tables et données de la base de données principale d'une application
|
||||
|
||||
### Règles intégrées
|
||||
|
||||
Les cinq règles de migration suivantes sont prises en charge :
|
||||
La gestion des migrations prend en charge les trois règles suivantes :
|
||||
|
||||
- **Structure seule :** Synchronise uniquement la structure des tables, sans insertion ni mise à jour des données.
|
||||
- **Écraser (vider et réinsérer) :** Vide les enregistrements existants de la table puis insère les nouvelles données.
|
||||
- **Insérer ou mettre à jour (Upsert) :** Détermine en fonction de la clé primaire ; met à jour si l'enregistrement existe, sinon l'insère.
|
||||
- **Insérer en ignorant les doublons :** Insère de nouveaux enregistrements ; en cas de conflit de clé primaire, ignore (ne met pas à jour les enregistrements existants).
|
||||
- **Ignorer :** N'effectue aucun traitement sur cette table.
|
||||
- **Structure seule :** synchronise uniquement la structure des tables, sans insertion ni mise à jour de données.
|
||||
- **Écraser :** supprime les enregistrements existants de la table, puis insère les nouvelles données.
|
||||
- **Ignorer :** ne traite pas cette table.
|
||||
|
||||
**Remarques :**
|
||||
- Les règles « Écraser », « Insérer ou mettre à jour » et « Insérer en ignorant les doublons » synchronisent également les modifications de structure de table.
|
||||
- Les tables avec un ID auto-incrémenté comme clé primaire ou sans clé primaire ne prennent pas en charge « Insérer ou mettre à jour » ni « Insérer en ignorant les doublons ».
|
||||
- Écraser synchronise aussi les changements de structure de table.
|
||||
- Les tables métier définies par l’utilisateur utilisent généralement Structure seule afin d’éviter d’écraser les données de production.
|
||||
|
||||
### Conception détaillée
|
||||
|
||||
|
||||
@@ -1,52 +1,103 @@
|
||||
# Gestion des versions
|
||||
---
|
||||
title: "Gestion des publications"
|
||||
description: "Bonnes pratiques de publication : utiliser la gestion des versions, le multi-app, les sauvegardes et la migration pour publier entre développement, préproduction et production."
|
||||
keywords: "Gestion des publications,Release,déploiement multi-environnement,gestion des versions,multi-app,sauvegarde,migration,NocoBase"
|
||||
---
|
||||
|
||||
# Gestion des publications
|
||||
|
||||
## Introduction
|
||||
|
||||
Dans les applications concrètes, pour garantir la sécurité des données et la stabilité de l'application, il est courant de déployer plusieurs environnements, tels qu'un environnement de développement, un environnement de pré-production et un environnement de production. Ce document présente deux exemples de flux de travail de développement sans code courants et explique en détail comment implémenter la gestion des versions dans NocoBase.
|
||||
La gestion des publications encadre le passage d’une application du développement à la production. Ce n’est pas une action unique, mais un processus répétable, vérifiable et récupérable.
|
||||
|
||||
## Installation
|
||||
Gardez la production stable. Terminez les changements en développement, validez-les en préproduction, puis publiez en production. Conservez fichiers de migration, sauvegardes, journaux d’exécution et résultats de validation.
|
||||
|
||||
Trois plugins sont essentiels pour la gestion des versions. Veuillez vous assurer que les plugins suivants sont activés.
|
||||
~~~text
|
||||
Développement -> Préproduction -> Production
|
||||
~~~
|
||||
|
||||
### Variables d'environnement et clés
|
||||
Le développement sert à configurer. La préproduction reproduit les contraintes de production. La production porte l’activité réelle.
|
||||
|
||||
- Plugin intégré, installé et activé par défaut.
|
||||
- Il permet la configuration et la gestion centralisées des variables d'environnement et des clés, utilisées pour le stockage de données sensibles, la réutilisation de données de configuration, l'isolation des configurations par environnement, etc. ([Consulter la documentation](#)).
|
||||
## Modèle de publication
|
||||
|
||||
### Gestionnaire de sauvegardes
|
||||
| Capacité | Problème résolu | Étape |
|
||||
| --- | --- | --- |
|
||||
| Gestion des versions | Conserve les jalons et points de retour | Développement |
|
||||
| Variables et secrets | Isole configuration et informations sensibles | Toutes les étapes |
|
||||
| Multi-app | Sépare les limites par module métier | Architecture et collaboration |
|
||||
| Sauvegarde | Conserve un état de production restaurable | Avant publication et exploitation |
|
||||
| Migration | Publie configuration et structure vers la cible | Préproduction et production |
|
||||
|
||||
- Ce plugin est disponible uniquement dans l'édition Professionnelle ou supérieure ([En savoir plus](https://www.nocobase.com/en/commercial)).
|
||||
- Il prend en charge la sauvegarde et la restauration, y compris les sauvegardes planifiées, garantissant la sécurité des données et une récupération rapide. ([Consulter la documentation](../backup-manager/index.mdx)).
|
||||
## Configuration d’environnement : utiliser les variables et secrets
|
||||
|
||||
### Gestionnaire de migrations
|
||||
Chaque environnement doit utiliser ses propres variables et secrets. Connexions de base de données, services tiers, comptes de test, tokens, API Keys et Webhooks ne doivent pas être codés en dur. Lors de la migration, complétez uniquement les valeurs manquantes de l’environnement cible.
|
||||
|
||||
- Ce plugin est disponible uniquement dans l'édition Professionnelle ou supérieure ([En savoir plus](https://www.nocobase.com/en/commercial)).
|
||||
- Il est utilisé pour migrer les configurations d'application d'un environnement d'application à un autre. ([Consulter la documentation](../migration-manager/index.md)).
|
||||
Documentation associée : [Variables et secrets](../variables-and-secrets/index.md).
|
||||
|
||||
## Flux de travail de développement sans code courants
|
||||
## Phase de développement : enregistrer des points récupérables
|
||||
|
||||
### Environnement de développement unique, déploiement unidirectionnel
|
||||
Utilisez la gestion des versions pour les étapes importantes. Créez une version avant une modification majeure, puis une autre après les changements de modèles, pages, droits, workflows ou plugins. Donnez une description métier claire.
|
||||
|
||||
Cette approche convient aux flux de travail de développement simples. Il y a un seul environnement de développement, un seul environnement de pré-production et un seul environnement de production. Les modifications passent de l'environnement de développement à l'environnement de pré-production, puis sont finalement déployées dans l'environnement de production. Dans ce flux de travail, seul l'environnement de développement peut modifier les configurations ; ni l'environnement de pré-production ni l'environnement de production n'autorisent les modifications.
|
||||
La gestion des versions sert surtout au développement. La publication passe par la migration. La restauration de production passe par la sauvegarde.
|
||||
|
||||
Documentation associée : [Gestion des versions](../version-control/index.md).
|
||||
|
||||
## Découpage en modules : contrôler les limites
|
||||
|
||||
Une petite application peut rester monolithique. Quand pages, tables, droits et workflows augmentent, une publication peut toucher plusieurs équipes. Le multi-app permet de séparer CRM, tickets, actifs, RH, rapports ou back-office.
|
||||
|
||||
Planifiez utilisateurs, organisations, authentification, permissions et données partagées avant de découper. Des limites nettes réduisent l’impact des publications.
|
||||
|
||||
~~~text
|
||||
CRM : Développement -> Préproduction -> Production
|
||||
Tickets : Développement -> Préproduction -> Production
|
||||
Actifs : Développement -> Préproduction -> Production
|
||||
~~~
|
||||
|
||||
Documentation associée : [Gestion multi-app](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Préparation : confirmer la restauration
|
||||
|
||||
Avant une publication en production, créez une sauvegarde. Pour une publication importante, testez la restauration dans un environnement indépendant. La sauvegarde doit couvrir base de données, fichiers téléversés et stockage nécessaire à l’exécution.
|
||||
|
||||
Documentation associée : [Gestion des sauvegardes](../backup-manager/index.mdx).
|
||||
|
||||
## Exécution : migrer vers l’environnement cible
|
||||
|
||||
La migration publie configuration applicative, structures de tables, configuration de plugins et certaines données. Publiez d’abord en préproduction ; après validation, utilisez le même fichier pour la production.
|
||||
|
||||

|
||||
|
||||
Lors de la configuration des règles de migration, sélectionnez la règle **« Priorité à l'écrasement »** pour les tables intégrées du noyau et des plugins si nécessaire ; pour toutes les autres, vous pouvez conserver les paramètres par défaut si vous n'avez pas d'exigences particulières.
|
||||
### Publier en préproduction
|
||||
|
||||
Exécutez le fichier généré depuis le développement. La préproduction doit être proche de la production : version du noyau, plugins, variables, secrets, permissions et connexions externes. Validez pages clés, droits, workflows et intégrations.
|
||||
|
||||
### Publier en production
|
||||
|
||||
Planifiez une fenêtre de maintenance, informez les utilisateurs et stoppez les accès ou affichez une page de maintenance. En multi-nœud, réduisez à un nœud avant migration. Après migration, validez les flux métier puis réactivez l’accès.
|
||||
|
||||
### Règles de migration
|
||||
|
||||
Les stratégies courantes sont écraser, structure seule et ignorer. Les tables intégrées suivent généralement la stratégie par défaut et utilisent écraser. Les tables utilisateur contenant des données métier utilisent généralement structure seule. Les tables de métadonnées peuvent être écrasées selon le scénario.
|
||||
|
||||
Consultez : [Tables intégrées des applications et principaux plugins](../migration-manager/built-in-tables.md).
|
||||
|
||||

|
||||
|
||||
### Plusieurs environnements de développement, déploiement fusionné
|
||||
La migration traite surtout la base principale. Sources externes, données de sous-applications et certains dossiers de stockage doivent être gérés séparément.
|
||||
|
||||
Cette approche convient aux scénarios de collaboration multi-personnes ou aux projets complexes. Plusieurs environnements de développement parallèles peuvent être utilisés indépendamment, et toutes les modifications sont fusionnées dans un environnement de pré-production unique pour les tests et la validation avant d'être déployées en production. Dans ce flux de travail, seul l'environnement de développement peut modifier les configurations ; ni l'environnement de pré-production ni l'environnement de production n'autorisent les modifications.
|
||||
Documentation associée : [Gestion des migrations](../migration-manager/index.md).
|
||||
|
||||

|
||||
## Retour arrière et restauration
|
||||
|
||||
Lors de la configuration des règles de migration, sélectionnez la règle **« Priorité à l'insertion ou à la mise à jour »** pour les tables intégrées du noyau et des plugins si nécessaire ; pour toutes les autres, vous pouvez conserver les paramètres par défaut si vous n'avez pas d'exigences particulières.
|
||||
En cas d’échec, utilisez d’abord la sauvegarde prépublication via Backup Manager. Si l’environnement courant reste accessible et seule la migration a échoué, restaurez sur place. Sinon, restaurez dans un environnement indépendant, validez les flux clés et basculez le trafic.
|
||||
|
||||

|
||||

|
||||
|
||||
## Annulation
|
||||
## Documentation associée
|
||||
|
||||
Avant d'exécuter une migration, le système crée automatiquement une sauvegarde de l'application actuelle. Si la migration échoue ou si les résultats ne correspondent pas à vos attentes, vous pouvez annuler et restaurer via le [Gestionnaire de sauvegardes](../backup-manager/index.mdx).
|
||||
|
||||

|
||||
- [Variables et secrets](../variables-and-secrets/index.md)
|
||||
- [Gestion des versions](../version-control/index.md)
|
||||
- [Gestion multi-app](../../multi-app/multi-app/index.md)
|
||||
- [Gestion des sauvegardes](../backup-manager/index.mdx)
|
||||
- [Gestion des migrations](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Manajemen Migrasi",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Tabel bawaan aplikasi dan plugin utama",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-backups'
|
||||
title: "Manajemen Backup"
|
||||
description: "Backup ops management: full backup database dan file user, scheduled backup, download/delete/restore, mendukung MySQL/PostgreSQL, perlu instalasi database client, fitur professional."
|
||||
description: "Backup ops management: full backup database dan file user, scheduled backup, download/delete/restore, mendukung MySQL/PostgreSQL, perlu memastikan database client tersedia."
|
||||
keywords: "manajemen backup,Backup,backup data,scheduled backup,restore backup,MySQL PostgreSQL,ops management,NocoBase"
|
||||
---
|
||||
# Manajemen Backup
|
||||
@@ -12,12 +12,18 @@ Plugin backup manager NocoBase menyediakan fitur full backup database NocoBase d
|
||||
|
||||
## Instalasi Database Client
|
||||
|
||||
Backup manager bergantung pada client dari main data yang sesuai. Sebelum digunakan, silakan unduh client yang sesuai dengan versi database yang digunakan dari website resmi:
|
||||
Backup manager bergantung pada database client untuk database utama. Sebelum digunakan, pastikan runtime environment saat ini memiliki client yang sesuai dengan versi database.
|
||||
|
||||
:::tip
|
||||
Jika menginstal NocoBase dengan Docker, disarankan menggunakan image `full` yang sesuai, seperti `latest-full`, `beta-full`, atau `alpha-full`. Image ini sudah menyertakan database client umum, sehingga biasanya tidak perlu instalasi manual.
|
||||
:::
|
||||
|
||||
Jika environment saat ini belum memiliki database client yang diperlukan, unduh client yang sesuai dengan versi database dari website resmi:
|
||||
|
||||
- MySQL: https://dev.mysql.com/downloads/
|
||||
- PostgreSQL: https://www.postgresql.org/download/
|
||||
|
||||
Versi Docker, Anda dapat langsung menulis script di direktori `./storage/scripts`
|
||||
Jika perlu instalasi manual di environment Docker, Anda dapat menulis script di direktori `./storage/scripts`
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Tabel bawaan aplikasi dan plugin utama"
|
||||
description: "Referensi tabel bawaan, strategi default Migration Manager, cakupan kontrol versi, serta perlakuan backup/restore."
|
||||
keywords: "Migration Manager,kontrol versi,backup restore,tabel bawaan,NocoBase"
|
||||
---
|
||||
|
||||
# Tabel bawaan aplikasi dan plugin utama
|
||||
|
||||
## Pendahuluan
|
||||
|
||||
Daftar ini menjelaskan perlakuan umum untuk tabel bawaan aplikasi dan plugin utama dalam migrasi, kontrol versi, dan backup/restore. Pada umumnya pengguna tidak perlu menyesuaikan tabel satu per satu. Gunakan strategi default.
|
||||
|
||||
Mekanisme ini memiliki fokus berbeda:
|
||||
|
||||
- **Migration Manager**: mempublikasikan antar-environment. Strategi umum meliputi overwrite, schema-only, dan skip.
|
||||
- **Kontrol versi**: menyimpan dan memulihkan titik penting saat membangun aplikasi.
|
||||
- **Backup/restore**: mencadangkan dan memulihkan status runtime aplikasi.
|
||||
|
||||
Kolom “Tipe data” berasal dari klasifikasi bawaan. Data dasar sistem ikut kontrol versi; data runtime bisnis tidak; data sementara runtime tidak dibackup.
|
||||
|
||||
## Referensi tabel bawaan
|
||||
|
||||
### Database
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | Data dasar sistem | Schema-only | Ikut | Dibackup |
|
||||
|
||||
### Server
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | Data dasar sistem | Schema-only | Ikut | Dibackup |
|
||||
|
||||
### System settings
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Client
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `spacesUsers` | Membership between users and spaces | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `collections` | Business collection fields, indexes, and metadata | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `fields` | Field types and constraints under collections | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### China region field
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `flowModels` | Model definitions for the modern flow engine | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `blockTemplates` | Reusable UI block definitions | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Map block
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### ACL
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `rolesResources` | Resources granted to roles | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `issuedTokens` | Issued login or API access tokens | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### API keys
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Users
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Departments
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Data runtime bisnis | Overwrite | Tidak ikut | Dibackup |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Data runtime bisnis | Overwrite | Tidak ikut | Dibackup |
|
||||
| `departmentsUsers` | Relationships between users and departments | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `userDataSyncTasks` | Synchronization task records | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `jobs` | Execution result of each node in a workflow run | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Data runtime bisnis | Overwrite | Tidak ikut | Dibackup |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Data runtime bisnis | Overwrite | Tidak ikut | Dibackup |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Data runtime bisnis | Overwrite | Tidak ikut | Dibackup |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `approvals` | Approval-flow templates and step configuration | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Verification
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `mailSettings` | Mail plugin switches and parameters | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Data runtime bisnis | Overwrite | Tidak ikut | Dibackup |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `mailMessageLabels` | Mail category label definitions | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### AI
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `aiSettings` | AI basic settings | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `aiMessages` | User and assistant messages in conversations | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Data sementara runtime | Schema-only | Tidak ikut | Tidak dibackup |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Data sementara runtime | Schema-only | Tidak ikut | Tidak dibackup |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Data sementara runtime | Schema-only | Tidak ikut | Tidak dibackup |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | Data dasar sistem | Schema-only | Ikut | Dibackup |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | Data dasar sistem | Schema-only | Ikut | Dibackup |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Data runtime bisnis | Overwrite | Tidak ikut | Dibackup |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Record history
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `recordHistoryFields` | Fields that need history records | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `recordHistoryTemplate` | Display template for history records | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
| `recordHistories` | Versioned change records for entire records | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### File manager
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `attachments` | File attachment metadata associated with business records | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Localization
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `localizationTranslations` | Actual translated content for each language | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Data runtime bisnis | Schema-only | Tidak ikut | Dibackup |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Tabel | Deskripsi | Tipe data | Strategi migrasi default | Kontrol versi | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | Data dasar sistem | Overwrite | Ikut | Dibackup |
|
||||
|
||||
## Tabel buatan pengguna
|
||||
|
||||
Tabel buatan pengguna secara default diperlakukan sebagai data bisnis. Umumnya cukup migrasikan struktur dan pilih schema-only.
|
||||
|
||||
Jika tabel menyimpan konfigurasi, kategori, template, rule, atau metadata, overwrite dapat dipilih sesuai skenario bisnis.
|
||||
|
||||
Jika tabel menyimpan pelanggan, order, tiket, approval, pesan, atau log, hindari overwrite data production.
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Manajemen Migrasi"
|
||||
description: "Migrasi ops management: migrasi konfigurasi aplikasi dari satu environment ke environment lain, mendukung rule migrasi only structure, overwrite, Upsert, insert ignore duplicate, skip, bergantung pada plugin backup management."
|
||||
keywords: "manajemen migrasi,Migration,migrasi konfigurasi aplikasi,rule migrasi,Upsert,migrasi database,ops management,NocoBase"
|
||||
description: "Migrasi operasional: memigrasikan konfigurasi aplikasi dari satu environment ke environment lain, dengan aturan schema-only, overwrite, dan skip. Bergantung pada Backup Manager."
|
||||
keywords: "Manajemen Migrasi,Migration,konfigurasi aplikasi,aturan migrasi,schema-only,overwrite,skip,NocoBase"
|
||||
---
|
||||
# Manajemen Migrasi
|
||||
|
||||
@@ -27,19 +27,17 @@ Memigrasi tabel data dan data dari main database, berdasarkan rule migrasi, dari
|
||||
|
||||
## Rule Migrasi
|
||||
|
||||
### Rule Built-in
|
||||
### Aturan bawaan
|
||||
|
||||
Mendukung lima rule migrasi berikut:
|
||||
Migration Manager mendukung tiga aturan berikut:
|
||||
|
||||
- **Only structure:** Hanya menyinkronkan struktur tabel data, tidak melibatkan insert atau update data.
|
||||
- **Overwrite (Truncate dan re-insert):** Mengosongkan record tabel yang ada, kemudian insert data baru.
|
||||
- **Insert or update (Upsert):** Berdasarkan primary key, jika record ada di-update, jika tidak ada di-insert.
|
||||
- **Insert ignore duplicates:** Insert record baru, jika primary key konflik diabaikan (tidak update record yang ada).
|
||||
- **Skip:** Tidak melakukan apa pun pada tabel ini.
|
||||
- **Schema-only:** Hanya menyinkronkan struktur tabel. Tidak ada data yang diinsert atau diupdate.
|
||||
- **Overwrite:** Menghapus record tabel yang ada, lalu menginsert data baru.
|
||||
- **Skip:** Tidak melakukan pemrosesan apa pun pada tabel.
|
||||
|
||||
**Catatan:**
|
||||
- Overwrite, insert or update, insert ignore duplicates juga akan menyinkronkan perubahan struktur tabel.
|
||||
- Tabel dengan auto-increment ID sebagai primary key atau tanpa primary key tidak mendukung "Insert or update" dan "Insert ignore duplicates".
|
||||
- Overwrite juga menyinkronkan perubahan struktur tabel.
|
||||
- Tabel data bisnis buatan pengguna biasanya menggunakan schema-only agar data production tidak tertimpa.
|
||||
|
||||
### Desain Detail
|
||||
|
||||
|
||||
@@ -1,58 +1,87 @@
|
||||
---
|
||||
title: "Manajemen Release"
|
||||
description: "Alur release ops management: deployment multi-environment development, pre-release, production, kombinasi plugin variable dan secret, manajemen backup, manajemen migrasi, alur release single/multi development environment, konfigurasi rule migrasi."
|
||||
keywords: "manajemen release,Release,deployment multi-environment,development pre-release production,rule migrasi,ops management,NocoBase"
|
||||
description: "Praktik terbaik release: kontrol versi, multi-aplikasi, Backup Manager, dan Migration Manager untuk development, staging, dan production."
|
||||
keywords: "Manajemen Release,Release,kontrol versi,multi-aplikasi,Backup Manager,Migration Manager,NocoBase"
|
||||
---
|
||||
|
||||
# Manajemen Release
|
||||
|
||||
## Pengantar
|
||||
## Pendahuluan
|
||||
|
||||
Dalam aplikasi nyata, untuk memastikan keamanan data dan running aplikasi yang stabil, biasanya kita perlu men-deploy beberapa environment, contohnya environment development, pre-release, dan production. Dokumen ini akan menjelaskan secara detail cara mengimplementasikan manajemen release di NocoBase melalui dua alur pengembangan no-code yang umum.
|
||||
Manajemen release mengatur proses aplikasi dari development ke production. Proses ini harus dapat diulang, diverifikasi, dan dipulihkan. Selesaikan perubahan di development, validasi di staging, lalu publish ke production. Simpan file migrasi, backup, log eksekusi, dan hasil validasi.
|
||||
|
||||
## Instalasi
|
||||
~~~text
|
||||
Development -> Staging -> Production
|
||||
~~~
|
||||
|
||||
Tiga plugin yang diperlukan untuk manajemen release, pastikan plugin berikut sudah diaktifkan.
|
||||
## Model release
|
||||
|
||||
### Variable dan Secret
|
||||
| Kapabilitas | Tujuan | Tahap |
|
||||
| --- | --- | --- |
|
||||
| Kontrol versi | Menyimpan checkpoint development | Development |
|
||||
| Variable dan secret | Memisahkan konfigurasi dan data sensitif | Semua environment |
|
||||
| Multi-aplikasi | Memisahkan modul bisnis | Arsitektur dan kolaborasi |
|
||||
| Backup Manager | Menyimpan kondisi production yang bisa dipulihkan | Sebelum release dan operasi |
|
||||
| Migration Manager | Mempublish konfigurasi dan struktur | Staging dan production |
|
||||
|
||||
- Plugin built-in, default terinstal dan aktif.
|
||||
- Mengkonfigurasi dan mengelola environment variable dan secret secara terpusat, untuk penyimpanan data sensitif, reuse data konfigurasi, isolasi konfigurasi environment, dll ([lihat dokumen](../variables-and-secrets/index.md)).
|
||||
## Konfigurasi environment
|
||||
|
||||
### Manajemen Backup
|
||||
Koneksi database, alamat layanan pihak ketiga, akun uji, token, API Key, dan Webhook sebaiknya memakai variable dan secret, bukan nilai hardcode di halaman, workflow, atau plugin.
|
||||
|
||||
- Plugin ini hanya tersedia di versi professional dan di atasnya ([pelajari lebih lanjut](https://www.nocobase.com/en/commercial)).
|
||||
- Menyediakan fitur backup dan restore, mendukung scheduled backup, memastikan keamanan data dan recovery cepat ([lihat dokumen](../backup-manager/index.mdx)).
|
||||
Dokumentasi terkait: [Variable dan Secret](../variables-and-secrets/index.md).
|
||||
|
||||
### Manajemen Migrasi
|
||||
## Tahap development
|
||||
|
||||
- Plugin ini hanya tersedia di versi professional dan di atasnya ([pelajari lebih lanjut](https://www.nocobase.com/en/commercial)).
|
||||
- Digunakan untuk migrasi konfigurasi aplikasi dari satu environment aplikasi ke environment aplikasi lainnya ([lihat dokumen](../migration-manager/index.md)).
|
||||
Gunakan kontrol versi sebelum dan sesudah perubahan besar pada model data, halaman, permission, workflow, atau plugin. Untuk publish antar-environment gunakan Migration Manager. Untuk pemulihan production gunakan Backup Manager.
|
||||
|
||||
## Alur Pengembangan No-Code Umum
|
||||
Dokumentasi terkait: [Kontrol versi](../version-control/index.md).
|
||||
|
||||
### Single Development Environment, Release Satu Arah
|
||||
## Pemisahan modul
|
||||
|
||||
Cocok untuk alur pengembangan sederhana. Environment development, pre-release, dan production masing-masing hanya satu, perubahan di-release dari environment development secara berurutan ke environment pre-release, dan akhirnya di-deploy ke environment production. Dalam alur ini, hanya environment development yang dapat memodifikasi konfigurasi, environment pre-release dan production tidak diizinkan untuk dimodifikasi.
|
||||
Sistem kecil dapat mulai dari satu aplikasi. Jika kompleksitas meningkat, pisahkan CRM, tiket, aset, HR, laporan, atau backend operasional menjadi aplikasi mandiri. Rencanakan user, organisasi, autentikasi, permission, dan data bersama lebih dulu.
|
||||
|
||||
~~~text
|
||||
CRM: Development -> Staging -> Production
|
||||
Tiket: Development -> Staging -> Production
|
||||
Aset: Development -> Staging -> Production
|
||||
~~~
|
||||
|
||||
Dokumentasi terkait: [Manajemen multi-aplikasi](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Persiapan
|
||||
|
||||
Buat backup sebelum release production. Untuk release penting, uji restore di environment terpisah. Backup harus mencakup database, file upload, dan storage yang dibutuhkan aplikasi.
|
||||
|
||||
Dokumentasi terkait: [Manajemen Backup](../backup-manager/index.mdx).
|
||||
|
||||
## Eksekusi release
|
||||
|
||||
Publish ke staging terlebih dahulu. Jika validasi berhasil, gunakan file migrasi yang sama untuk production.
|
||||
|
||||

|
||||
|
||||
Saat mengkonfigurasi rule migrasi, tabel built-in core dan plugin pilih rule "Overwrite priority", lainnya dapat dibiarkan default jika tidak ada kebutuhan khusus
|
||||
|
||||

|
||||
|
||||
### Multiple Development Environment, Merge Release
|
||||
|
||||
Cocok untuk skenario kolaborasi multi-orang atau proyek kompleks. Beberapa environment development paralel dapat dikembangkan secara independen, semua perubahan digabungkan secara terpadu ke environment pre-release untuk testing dan validasi, akhirnya di-release ke environment production. Dalam alur ini, juga hanya environment development yang dapat memodifikasi konfigurasi, environment pre-release dan production tidak diizinkan untuk dimodifikasi.
|
||||
|
||||

|
||||
|
||||
Saat mengkonfigurasi rule migrasi, tabel built-in core dan plugin pilih rule "Insert or update priority", lainnya dapat dibiarkan default jika tidak ada kebutuhan khusus
|
||||
|
||||

|
||||
|
||||
## Rollback
|
||||
|
||||
Sebelum eksekusi migrasi, akan dilakukan backup otomatis untuk aplikasi saat ini. Jika migrasi gagal atau hasilnya tidak sesuai harapan, Anda dapat melakukan rollback recovery melalui [Backup Manager](../backup-manager/index.mdx).
|
||||
|
||||

|
||||
|
||||
Saat production release, gunakan maintenance window, beri tahu pengguna, dan cegah penulisan data baru. Pada multi-node, scale down ke satu node sebelum migrasi. Setelah selesai, validasi alur utama lalu pulihkan akses.
|
||||
|
||||
### Aturan migrasi
|
||||
|
||||
Strategi umum: overwrite, schema-only, dan skip. Tabel bawaan biasanya mengikuti strategi default. Tabel data bisnis buatan pengguna biasanya memakai schema-only. Tabel metadata dapat memakai overwrite sesuai skenario.
|
||||
|
||||
Lihat: [Tabel bawaan aplikasi dan plugin utama](../migration-manager/built-in-tables.md).
|
||||
|
||||
Dokumentasi terkait: [Manajemen Migrasi](../migration-manager/index.md).
|
||||
|
||||
## Rollback dan pemulihan
|
||||
|
||||
Jika release gagal, gunakan backup sebelum release. Restore di environment saat ini jika masih stabil; jika tidak, restore di environment terpisah, validasi, lalu alihkan traffic.
|
||||
|
||||
## Dokumentasi terkait
|
||||
|
||||
- [Variable dan Secret](../variables-and-secrets/index.md)
|
||||
- [Kontrol versi](../version-control/index.md)
|
||||
- [Manajemen multi-aplikasi](../../multi-app/multi-app/index.md)
|
||||
- [Manajemen Backup](../backup-manager/index.mdx)
|
||||
- [Manajemen Migrasi](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "移行管理",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "アプリケーションと主要プラグインの組み込みテーブル",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,12 +10,18 @@ NocoBase バックアップマネージャープラグインは、NocoBase デ
|
||||
|
||||
## データベースクライアントのインストール
|
||||
|
||||
バックアップマネージャーは、対応するデータベースのクライアントに依存します。使用する前に、公式サイトからお使いのデータベースバージョンに合ったクライアントをダウンロードしてください。
|
||||
バックアップ管理は、メインデータベースに対応するデータベースクライアントに依存します。使用前に、現在の実行環境にデータベースバージョンと一致するクライアントがあることを確認してください。
|
||||
|
||||
:::tip
|
||||
Docker で NocoBase をインストールする場合は、利用するバージョンに対応する `full` イメージの使用を推奨します。例:`latest-full`、`beta-full`、`alpha-full`。これらのイメージには一般的なデータベースクライアントが含まれているため、通常は手動インストール不要です。
|
||||
:::
|
||||
|
||||
現在の環境に必要なデータベースクライアントがない場合は、公式サイトからデータベースバージョンに合ったクライアントをダウンロードしてください。
|
||||
|
||||
- MySQL:https://dev.mysql.com/downloads/
|
||||
- PostgreSQL:https://www.postgresql.org/download/
|
||||
|
||||
Docker版の場合、直接 `./storage/scripts` ディレクトリにスクリプトを作成できます。
|
||||
Docker 環境で手動インストールが必要な場合は、`./storage/scripts` ディレクトリにスクリプトを作成できます。
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "アプリケーションと主要プラグインの組み込みテーブル"
|
||||
description: "組み込みテーブルの参考情報。移行管理の既定戦略、バージョン管理の対象範囲、バックアップ/復元の扱いを示します。"
|
||||
keywords: "移行管理,バージョン管理,バックアップ,復元,組み込みテーブル,NocoBase"
|
||||
---
|
||||
|
||||
# アプリケーションと主要プラグインの組み込みテーブル
|
||||
|
||||
## はじめに
|
||||
|
||||
この一覧は、アプリケーションと主要プラグインの組み込みテーブルについて、移行管理、バージョン管理、バックアップ/復元での一般的な扱いを示します。多くの場合、ユーザーがテーブルごとに調整する必要はありません。既定戦略を使用してください。
|
||||
|
||||
各仕組みの目的は異なります。
|
||||
|
||||
- **移行管理**: 環境間の公開に使用します。主な戦略は上書き、スキーマのみ、スキップです。
|
||||
- **バージョン管理**: アプリ構築中の重要な時点を保存・復元します。
|
||||
- **バックアップ/復元**: アプリの実行状態をバックアップし復元します。
|
||||
|
||||
「データ型」は組み込み分類に基づきます。システム基礎データはバージョン管理に参加し、業務実行データは参加せず、実行時一時データはバックアップされません。
|
||||
|
||||
## 組み込みテーブル参考
|
||||
|
||||
### Database
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | システム基礎データ | スキーマのみ | 対象 | バックアップ対象 |
|
||||
|
||||
### Server
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | システム基礎データ | スキーマのみ | 対象 | バックアップ対象 |
|
||||
|
||||
### System settings
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Client
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `spacesUsers` | Membership between users and spaces | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Main data source
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `collections` | Business collection fields, indexes, and metadata | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `fields` | Field types and constraints under collections | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### External database connections
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### China region field
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### UI templates
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `flowModels` | Model definitions for the modern flow engine | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Block templates
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `blockTemplates` | Reusable UI block definitions | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### iframe block
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Mobile
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Map block
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Public forms
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Template printing
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### ACL
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `rolesResources` | Resources granted to roles | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Authentication
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `issuedTokens` | Issued login or API access tokens | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### API keys
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Password policy
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Users
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Departments
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | 業務実行データ | 上書き | 対象外 | バックアップ対象 |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | 業務実行データ | 上書き | 対象外 | バックアップ対象 |
|
||||
| `departmentsUsers` | Relationships between users and departments | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### User data sync
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `userDataSyncTasks` | Synchronization task records | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Workflow
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `jobs` | Execution result of each node in a workflow run | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `workflowCategories` | Workflow grouping in the UI | 業務実行データ | 上書き | 対象外 | バックアップ対象 |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | 業務実行データ | 上書き | 対象外 | バックアップ対象 |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `workflowTasks` | Task execution records for automation nodes | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | 業務実行データ | 上書き | 対象外 | バックアップ対象 |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `approvals` | Approval-flow templates and step configuration | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Verification
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `mailSettings` | Mail plugin switches and parameters | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | 業務実行データ | 上書き | 対象外 | バックアップ対象 |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `mailMessageLabels` | Mail category label definitions | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `mailMessages` | Indexes for synced or sent email content | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### AI
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `aiSettings` | AI basic settings | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `aiMessages` | User and assistant messages in conversations | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | 実行時一時データ | スキーマのみ | 対象外 | バックアップ対象外 |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | 実行時一時データ | スキーマのみ | 対象外 | バックアップ対象外 |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | 実行時一時データ | スキーマのみ | 対象外 | バックアップ対象外 |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | システム基礎データ | スキーマのみ | 対象 | バックアップ対象 |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | システム基礎データ | スキーマのみ | 対象 | バックアップ対象 |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | 業務実行データ | 上書き | 対象外 | バックアップ対象 |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Record history
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `recordHistoryFields` | Fields that need history records | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `recordHistoryTemplate` | Display template for history records | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
| `recordHistories` | Versioned change records for entire records | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### File manager
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `attachments` | File attachment metadata associated with business records | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Localization
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `localizationTranslations` | Actual translated content for each language | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | 業務実行データ | スキーマのみ | 対象外 | バックアップ対象 |
|
||||
|
||||
### Custom request
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| テーブル | 説明 | データ型 | 移行の既定戦略 | バージョン管理 | バックアップ/復元 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | システム基礎データ | 上書き | 対象 | バックアップ対象 |
|
||||
|
||||
## ユーザー定義テーブル
|
||||
|
||||
ユーザー定義テーブルは既定で業務データとして扱われます。通常は構造のみを移行し、スキーマのみを選択します。
|
||||
|
||||
設定、カテゴリ、テンプレート、ルールなどのメタデータを保存する場合は、業務シナリオに応じて上書きを選択できます。
|
||||
|
||||
顧客、注文、チケット、承認記録、メッセージ、ログなどの実行データを保存する場合、本番レコードの上書きは避けてください。
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "移行管理"
|
||||
description: "運用管理における移行:アプリケーション設定をある環境から別の環境へ移行します。スキーマのみ、上書き、Upsert、重複無視挿入、スキップなどの移行ルールに対応し、バックアップ管理プラグインに依存します。"
|
||||
keywords: "移行管理,Migration,アプリケーション設定移行,移行ルール,Upsert,データベース移行,運用管理,NocoBase"
|
||||
description: "運用管理の移行:アプリケーション設定を環境間で移行し、スキーマのみ、上書き、スキップのルールに対応します。バックアップ管理プラグインに依存します。"
|
||||
keywords: "移行管理,Migration,アプリケーション設定移行,移行ルール,スキーマのみ,上書き,スキップ,NocoBase"
|
||||
---
|
||||
# 移行管理
|
||||
|
||||
@@ -29,17 +29,15 @@ keywords: "移行管理,Migration,アプリケーション設定移行,移行ル
|
||||
|
||||
### 組み込みルール
|
||||
|
||||
以下の 5 種類の移行ルールに対応しています:
|
||||
移行管理は次の 3 種類のルールに対応しています。
|
||||
|
||||
- **スキーマのみ:** データテーブルの構造のみを同期し、データの挿入や更新は行いません。
|
||||
- **上書き(クリアして再挿入):** 既存のテーブルレコードをクリアし、新しいデータを挿入します。
|
||||
- **挿入または更新(Upsert):** 主キーに基づいて判断し、レコードが存在すれば更新、存在しなければ挿入します。
|
||||
- **重複を無視して挿入:** 新しいレコードを挿入しますが、主キーが競合する場合は無視します(既存レコードは更新されません)。
|
||||
- **スキップ:** そのテーブルに対して何も処理を行いません。
|
||||
- **スキーマのみ:** テーブル構造のみを同期し、データの挿入や更新は行いません。
|
||||
- **上書き:** 既存のテーブルレコードを削除し、新しいデータを挿入します。
|
||||
- **スキップ:** そのテーブルに対して処理を行いません。
|
||||
|
||||
**補足:**
|
||||
- 上書き、挿入または更新、重複を無視して挿入でも、テーブル構造の変更は同期されます。
|
||||
- 自動増分 ID を主キーとするテーブル、または主キーがないテーブルでは「挿入または更新」と「重複を無視して挿入」はサポートされません。
|
||||
- 上書きでもテーブル構造の変更は同期されます。
|
||||
- ユーザー定義の業務データテーブルは通常、本番データの上書きを避けるためスキーマのみを選択します。
|
||||
|
||||
### 詳細設計
|
||||
|
||||
@@ -49,6 +47,8 @@ keywords: "移行管理,Migration,アプリケーション設定移行,移行ル
|
||||
|
||||
移行ルールの設定
|
||||
|
||||
既定戦略に対応するテーブルについては、[アプリケーションと主要プラグインの組み込みテーブル](./built-in-tables.md) を参照してください。
|
||||
|
||||

|
||||
|
||||
独立ルールの有効化
|
||||
|
||||
@@ -1,52 +1,87 @@
|
||||
---
|
||||
title: "リリース管理"
|
||||
description: "運用リリースのベストプラクティス:バージョン管理、マルチアプリ、バックアップ管理、移行管理を使い、開発・ステージング・本番へ公開します。"
|
||||
keywords: "リリース管理,Release,バージョン管理,マルチアプリ,バックアップ管理,移行管理,NocoBase"
|
||||
---
|
||||
|
||||
# リリース管理
|
||||
|
||||
## はじめに
|
||||
|
||||
実際のアプリケーションでは、データセキュリティとアプリケーションの安定稼働を確保するために、通常、複数の環境(例えば、開発環境、プレリリース環境、本番環境など)をデプロイする必要があります。このドキュメントでは、一般的な2つのノーコード開発プロセスを例に挙げ、NocoBaseでリリース管理をどのように実現するかを詳しく説明します。
|
||||
リリース管理は、アプリケーションを開発から本番へ進めるための、再現可能で検証可能、かつ復旧可能なプロセスです。変更は開発で完了し、ステージングで検証してから本番へ公開します。移行ファイル、バックアップ、実行ログ、検証結果は保管してください。
|
||||
|
||||
## インストール
|
||||
~~~text
|
||||
開発環境 -> ステージング環境 -> 本番環境
|
||||
~~~
|
||||
|
||||
リリース管理には必須の3つのプラグインがあります。以下のプラグインが有効化されていることを確認してください。
|
||||
## リリースモデル
|
||||
|
||||
### 環境変数
|
||||
| 能力 | 目的 | 段階 |
|
||||
| --- | --- | --- |
|
||||
| バージョン管理 | 開発中のチェックポイントを保存 | 開発 |
|
||||
| 変数とシークレット | 環境ごとの設定と機密情報を分離 | 全段階 |
|
||||
| マルチアプリ | 業務モジュールの境界を分離 | 設計と協業 |
|
||||
| バックアップ管理 | 復旧可能な本番状態を保存 | リリース前と運用 |
|
||||
| 移行管理 | 設定と構造を対象環境へ公開 | ステージングと本番 |
|
||||
|
||||
- 内蔵プラグインで、デフォルトでインストールおよび有効化されています。
|
||||
- 環境変数とシークレットを一元的に設定・管理します。機密データの保存、設定データの再利用、環境ごとの設定分離などに利用されます。([ドキュメントを見る](#))
|
||||
## 環境設定
|
||||
|
||||
### バックアップマネージャー
|
||||
DB 接続、外部サービス URL、テストアカウント、トークン、API Key、Webhook はページ、ワークフロー、プラグイン設定に直接書かず、変数とシークレットで参照します。
|
||||
|
||||
- このプラグインは、プロフェッショナル版以上のバージョンでのみ利用可能です。([詳細はこちら](https://www.nocobase.com/en/commercial))
|
||||
- バックアップと復元機能を提供し、定期的なバックアップにも対応しています。データセキュリティと迅速な復旧を確保します。([ドキュメントを見る](../backup-manager/index.mdx))
|
||||
関連ドキュメント: [変数とシークレット](../variables-and-secrets/index.md)。
|
||||
|
||||
### マイグレーションマネージャー
|
||||
## 開発段階
|
||||
|
||||
- このプラグインは、プロフェッショナル版以上のバージョンでのみ利用可能です。([詳細はこちら](https://www.nocobase.com/en/commercial))
|
||||
- アプリケーション設定を、あるアプリケーション環境から別のアプリケーション環境へ移行するために使用します。([ドキュメントを見る](../migration-manager/index.md))
|
||||
データモデル、ページ、権限、ワークフロー、プラグイン設定を大きく変更する前後でバージョンを作成します。環境間の公開は移行管理を使い、本番復旧はバックアップ管理を使います。
|
||||
|
||||
## 一般的なノーコード開発プロセス
|
||||
関連ドキュメント: [バージョン管理](../version-control/index.md)。
|
||||
|
||||
### 単一開発環境、一方向リリース
|
||||
## モジュール分割
|
||||
|
||||
シンプルな開発プロセスに適しています。開発環境、プレリリース環境、本番環境がそれぞれ1つずつあり、変更は開発環境からプレリリース環境へ順次リリースされ、最終的に本番環境にデプロイされます。このプロセスでは、開発環境のみが設定を変更でき、プレリリース環境と本番環境では変更が許可されません。
|
||||
小規模なら単一アプリから開始できます。規模が大きくなったら、CRM、チケット、資産、HR、レポート、運用バックエンドなどを別アプリに分けます。ユーザー、組織、認証、権限、共有データを先に設計してください。
|
||||
|
||||
~~~text
|
||||
CRM: 開発 -> ステージング -> 本番
|
||||
チケット: 開発 -> ステージング -> 本番
|
||||
資産: 開発 -> ステージング -> 本番
|
||||
~~~
|
||||
|
||||
関連ドキュメント: [マルチアプリ管理](../../multi-app/multi-app/index.md)。
|
||||
|
||||
## リリース前準備
|
||||
|
||||
本番公開前にバックアップを作成します。重要なリリースでは独立環境で復元を検証します。バックアップはデータベース、アップロードファイル、必要な storage を含めます。
|
||||
|
||||
関連ドキュメント: [バックアップ管理](../backup-manager/index.mdx)。
|
||||
|
||||
## リリース実行
|
||||
|
||||
まずステージングへ公開します。検証が通った同じ移行ファイルを本番で使用します。
|
||||
|
||||

|
||||
|
||||
移行ルールを設定する際は、コアとプラグインの組み込みテーブルで「上書き優先」ルールを選択してください。その他のテーブルは、特別な要件がなければデフォルト設定のままで問題ありません。
|
||||
|
||||

|
||||
|
||||
### 複数開発環境、マージリリース
|
||||

|
||||
|
||||
複数人での共同作業や複雑なプロジェクトのシナリオに適しています。複数の並行する開発環境でそれぞれ独立して開発を行い、すべての変更はプレリリース環境に統合(マージ)されてテストと検証が行われ、最終的に本番環境にリリースされます。このプロセスでも、開発環境のみが設定を変更でき、プレリリース環境と本番環境では変更が許可されません。
|
||||
本番ではメンテナンス時間を確保し、ユーザーへ通知し、新規書き込みを止めます。マルチノードでは移行前に 1 ノードへ縮小します。完了後、主要フローを検証してアクセスを戻します。
|
||||
|
||||

|
||||
### 移行ルール
|
||||
|
||||
移行ルールを設定する際は、コアとプラグインの組み込みテーブルで「挿入または更新優先」ルールを選択してください。その他のテーブルは、特別な要件がなければデフォルト設定のままで問題ありません。
|
||||
主な戦略は上書き、スキーマのみ、スキップです。組み込みテーブルは通常既定戦略に従います。ユーザー定義の業務データ表は通常スキーマのみを使います。メタデータ表はシナリオに応じて上書きを選択できます。
|
||||
|
||||

|
||||
参照: [アプリケーションと主要プラグインの組み込みテーブル](../migration-manager/built-in-tables.md)。
|
||||
|
||||
## ロールバック
|
||||
関連ドキュメント: [移行管理](../migration-manager/index.md)。
|
||||
|
||||
移行を実行する前に、現在のアプリケーションのバックアップが自動的に作成されます。移行が失敗した場合や、結果が期待どおりでなかった場合は、[バックアップマネージャー](../backup-manager/index.mdx) を使ってロールバックし、復元することができます。
|
||||
## ロールバックと復旧
|
||||
|
||||

|
||||
失敗時はまずリリース前バックアップを使います。現環境が安定していればそこで復元し、不安定な場合は独立環境で復元、検証後にトラフィックを切り替えます。
|
||||
|
||||
## 関連ドキュメント
|
||||
|
||||
- [変数とシークレット](../variables-and-secrets/index.md)
|
||||
- [バージョン管理](../version-control/index.md)
|
||||
- [マルチアプリ管理](../../multi-app/multi-app/index.md)
|
||||
- [バックアップ管理](../backup-manager/index.mdx)
|
||||
- [移行管理](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Gerenciamento de migrações",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Tabelas integradas de aplicações e plugins principais",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,12 +10,18 @@ O plugin Gerenciador de Backups do NocoBase oferece recursos para backup complet
|
||||
|
||||
## Instalar Cliente de Banco de Dados
|
||||
|
||||
O Gerenciador de Backups depende do cliente para o banco de dados correspondente. Antes de usar, visite o site oficial para baixar o cliente que corresponde à sua versão de banco de dados:
|
||||
O Gerenciador de Backups depende do cliente de banco de dados do banco principal. Antes de usar, confirme se o ambiente de execução atual possui um cliente compatível com a versão do banco de dados.
|
||||
|
||||
:::tip
|
||||
Ao instalar o NocoBase com Docker, prefira a imagem `full` correspondente, como `latest-full`, `beta-full` ou `alpha-full`. Essas imagens já incluem clientes de banco de dados comuns, então normalmente não é necessário instalá-los manualmente.
|
||||
:::
|
||||
|
||||
Se o ambiente atual não tiver o cliente necessário, baixe no site oficial o cliente correspondente à versão do banco de dados:
|
||||
|
||||
- MySQL: https://dev.mysql.com/downloads/
|
||||
- PostgreSQL: https://www.postgresql.org/download/
|
||||
|
||||
Para versões Docker, você pode escrever um script diretamente no diretório `./storage/scripts`
|
||||
Se precisar instalar manualmente em um ambiente Docker, você pode escrever um script no diretório `./storage/scripts`
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Tabelas integradas de aplicações e plugins principais"
|
||||
description: "Referência de tabelas integradas, estratégias padrão de migração, escopo do controle de versão e tratamento de backup/restauração."
|
||||
keywords: "migração,controle de versão,backup,restauração,tabelas integradas,NocoBase"
|
||||
---
|
||||
|
||||
# Tabelas integradas de aplicações e plugins principais
|
||||
|
||||
## Introdução
|
||||
|
||||
Esta lista explica o tratamento comum das tabelas integradas de aplicações e plugins principais em migração, controle de versão e backup/restauração. Na maioria dos casos, não é necessário ajustar tabela por tabela. Use a estratégia padrão.
|
||||
|
||||
Os mecanismos têm focos diferentes:
|
||||
|
||||
- **Gerenciamento de migrações**: publica entre ambientes. Estratégias comuns incluem sobrescrever, somente estrutura e ignorar.
|
||||
- **Controle de versão**: salva e restaura pontos importantes durante a construção da aplicação.
|
||||
- **Backup/restauração**: faz backup e restaura o estado de execução da aplicação.
|
||||
|
||||
A coluna “Tipo de dados” vem da classificação integrada. Dados base do sistema participam do controle de versão; dados de execução de negócio não; dados temporários de execução não são salvos em backup.
|
||||
|
||||
## Referência de tabelas integradas
|
||||
|
||||
### Database
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | Dados base do sistema | Somente estrutura | Participa | Com backup |
|
||||
|
||||
### Server
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | Dados base do sistema | Somente estrutura | Participa | Com backup |
|
||||
|
||||
### System settings
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Client
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `spacesUsers` | Membership between users and spaces | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `collections` | Business collection fields, indexes, and metadata | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `fields` | Field types and constraints under collections | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### China region field
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `flowModels` | Model definitions for the modern flow engine | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `blockTemplates` | Reusable UI block definitions | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Map block
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### ACL
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `rolesResources` | Resources granted to roles | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `issuedTokens` | Issued login or API access tokens | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### API keys
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Users
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Departments
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Dados de execução de negócio | Sobrescrever | Não participa | Com backup |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Dados de execução de negócio | Sobrescrever | Não participa | Com backup |
|
||||
| `departmentsUsers` | Relationships between users and departments | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `userDataSyncTasks` | Synchronization task records | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `jobs` | Execution result of each node in a workflow run | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Dados de execução de negócio | Sobrescrever | Não participa | Com backup |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Dados de execução de negócio | Sobrescrever | Não participa | Com backup |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Dados de execução de negócio | Sobrescrever | Não participa | Com backup |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `approvals` | Approval-flow templates and step configuration | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Verification
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `mailSettings` | Mail plugin switches and parameters | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Dados de execução de negócio | Sobrescrever | Não participa | Com backup |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `mailMessageLabels` | Mail category label definitions | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### AI
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `aiSettings` | AI basic settings | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `aiMessages` | User and assistant messages in conversations | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Dados temporários de execução | Somente estrutura | Não participa | Sem backup |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Dados temporários de execução | Somente estrutura | Não participa | Sem backup |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Dados temporários de execução | Somente estrutura | Não participa | Sem backup |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | Dados base do sistema | Somente estrutura | Participa | Com backup |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | Dados base do sistema | Somente estrutura | Participa | Com backup |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Dados de execução de negócio | Sobrescrever | Não participa | Com backup |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Record history
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `recordHistoryFields` | Fields that need history records | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `recordHistoryTemplate` | Display template for history records | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
| `recordHistories` | Versioned change records for entire records | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### File manager
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `attachments` | File attachment metadata associated with business records | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Localization
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `localizationTranslations` | Actual translated content for each language | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Dados de execução de negócio | Somente estrutura | Não participa | Com backup |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Tabela | Descrição | Tipo de dados | Estratégia padrão | Controle de versão | Backup/restauração |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | Dados base do sistema | Sobrescrever | Participa | Com backup |
|
||||
|
||||
## Tabelas definidas pelo usuário
|
||||
|
||||
Tabelas definidas pelo usuário são tratadas como dados de negócio por padrão. Em geral, migre apenas a estrutura.
|
||||
|
||||
Se armazenarem configuração, categorias, modelos, regras ou metadados, escolha sobrescrever conforme o cenário.
|
||||
|
||||
Se armazenarem clientes, pedidos, tickets, aprovações, mensagens ou logs, evite sobrescrever a produção.
|
||||
@@ -1,5 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Gerenciamento de migrações"
|
||||
description: "Migração operacional: migre configurações de aplicação entre ambientes, com regras de somente estrutura, sobrescrever e ignorar. Depende do Backup Manager."
|
||||
keywords: "Gerenciamento de migrações,Migration,configuração de aplicação,regras de migração,somente estrutura,sobrescrever,ignorar,NocoBase"
|
||||
---
|
||||
|
||||
# Gerenciador de Migração
|
||||
@@ -20,21 +23,17 @@ O Gerenciador de Migração transfere tabelas e dados do banco de dados principa
|
||||
|
||||
## Regras de Migração
|
||||
|
||||
### Regras Integradas
|
||||
### Regras integradas
|
||||
|
||||
O Gerenciador de Migração pode migrar todas as tabelas no banco de dados principal e atualmente suporta as cinco regras a seguir:
|
||||
O Gerenciador de Migrações oferece suporte às três regras a seguir:
|
||||
|
||||
- Apenas Estrutura: Migra apenas a estrutura (schema) das tabelas, sem inserir ou atualizar dados.
|
||||
- Sobrescrever (limpar e reinserir): Exclui todos os registros existentes na tabela do banco de dados de destino e, em seguida, insere os novos dados.
|
||||
- Inserir ou Atualizar (Upsert): Verifica se cada registro existe (pela chave primária). Se existir, ele o atualiza; caso contrário, o insere.
|
||||
- Inserir e Ignorar Duplicados: Insere novos registros, mas se um registro já existir (pela chave primária), a inserção é ignorada (nenhuma atualização ocorre).
|
||||
- Pular: Ignora completamente o processamento da tabela (sem alterações de estrutura ou migração de dados).
|
||||
- **Somente estrutura:** sincroniza apenas a estrutura da tabela. Não insere nem atualiza dados.
|
||||
- **Sobrescrever:** remove os registros existentes da tabela e insere novos dados.
|
||||
- **Ignorar:** não realiza nenhum processamento nessa tabela.
|
||||
|
||||
Observações:
|
||||
|
||||
- As regras 'Sobrescrever', 'Inserir ou Atualizar' e 'Inserir e Ignorar Duplicados' também sincronizam as alterações na estrutura da tabela.
|
||||
- Se uma tabela usa um ID de auto incremento como chave primária, ou se não possui chave primária, as regras 'Inserir ou Atualizar' e 'Inserir e Ignorar Duplicados' não podem ser aplicadas.
|
||||
- As regras 'Inserir ou Atualizar' e 'Inserir e Ignorar Duplicados' dependem da chave primária para determinar se o registro já existe.
|
||||
**Observações:**
|
||||
- Sobrescrever também sincroniza alterações na estrutura da tabela.
|
||||
- Tabelas de dados de negócio definidas pelo usuário normalmente usam Somente estrutura para evitar sobrescrever dados de produção.
|
||||
|
||||
### Design Detalhado
|
||||
|
||||
|
||||
@@ -1,52 +1,87 @@
|
||||
# Gerenciamento de Lançamentos
|
||||
---
|
||||
title: "Gerenciamento de publicações"
|
||||
description: "Boas práticas de publicação: controle de versão, multi-app, Backup Manager e Migration Manager para desenvolvimento, homologação e produção."
|
||||
keywords: "Gerenciamento de publicações,Release,controle de versão,multi-app,Backup Manager,Migration Manager,NocoBase"
|
||||
---
|
||||
|
||||
# Gerenciamento de publicações
|
||||
|
||||
## Introdução
|
||||
|
||||
Em aplicações reais, para garantir a segurança dos dados e a estabilidade das aplicações, geralmente precisamos implantar múltiplos ambientes, como ambiente de desenvolvimento, ambiente de pré-produção e ambiente de produção. Este documento apresenta dois processos comuns de desenvolvimento no-code e detalha como implementar o gerenciamento de lançamentos no NocoBase.
|
||||
O gerenciamento de publicações define um processo repetível, verificável e recuperável para levar uma aplicação do desenvolvimento à produção. Conclua mudanças em desenvolvimento, valide em homologação e só depois publique em produção. Guarde arquivos de migração, backups, logs e resultados de validação.
|
||||
|
||||
## Instalação
|
||||
~~~text
|
||||
Desenvolvimento -> Homologação -> Produção
|
||||
~~~
|
||||
|
||||
Três plugins são essenciais para o gerenciamento de lançamentos. Certifique-se de que os seguintes plugins estejam ativados.
|
||||
## Modelo de publicação
|
||||
|
||||
### Variáveis e Segredos
|
||||
| Capacidade | Finalidade | Etapa |
|
||||
| --- | --- | --- |
|
||||
| Controle de versão | Salvar marcos e pontos de retorno | Desenvolvimento |
|
||||
| Variáveis e segredos | Isolar configuração e dados sensíveis | Todas |
|
||||
| Multi-app | Separar módulos e reduzir impacto | Arquitetura |
|
||||
| Backup Manager | Manter estado recuperável | Antes da publicação e operação |
|
||||
| Migration Manager | Publicar configuração e estrutura | Homologação e produção |
|
||||
|
||||
- Plugin integrado, instalado e ativado por padrão.
|
||||
- Oferece configuração e gerenciamento centralizados de variáveis de ambiente e segredos, utilizados para armazenamento de dados sensíveis, reutilização de dados de configuração, isolamento de configurações por ambiente, etc. ([Ver Documentação](#)).
|
||||
## Configuração de ambiente
|
||||
|
||||
### Gerenciador de Backup
|
||||
Conexões de banco, serviços externos, contas de teste, tokens, API Keys e Webhooks devem usar variáveis e segredos, não valores fixos em páginas, workflows ou plugins.
|
||||
|
||||
- Este plugin está disponível apenas na edição Professional ou superior ([Saiba mais](https://www.nocobase.com/en/commercial)).
|
||||
- Oferece funcionalidades de backup e restauração, incluindo backups agendados, garantindo a segurança dos dados e uma recuperação rápida. ([Ver Documentação](../backup-manager/index.mdx)).
|
||||
Documentação relacionada: [Variáveis e segredos](../variables-and-secrets/index.md).
|
||||
|
||||
### Gerenciador de Migração
|
||||
## Desenvolvimento
|
||||
|
||||
- Este plugin está disponível apenas na edição Professional ou superior ([Saiba mais](https://www.nocobase.com/en/commercial)).
|
||||
- Usado para migrar configurações de aplicações de um ambiente para outro ([Ver Documentação](../migration-manager/index.md)).
|
||||
Use controle de versão antes e depois de mudanças relevantes em modelos, páginas, permissões, workflows ou plugins. A publicação entre ambientes deve usar o Migration Manager; recuperação de produção deve usar Backup Manager.
|
||||
|
||||
## Processos Comuns de Desenvolvimento No-Code
|
||||
Documentação relacionada: [Controle de versão](../version-control/index.md).
|
||||
|
||||
### Ambiente de Desenvolvimento Único, Lançamento Unidirecional
|
||||
## Divisão em módulos
|
||||
|
||||
Ideal para processos de desenvolvimento simples. Há um único ambiente de desenvolvimento, um de pré-produção e um de produção. As alterações fluem do ambiente de desenvolvimento para o ambiente de pré-produção e, finalmente, são implantadas no ambiente de produção. Neste processo, apenas o ambiente de desenvolvimento pode modificar as configurações — nem o ambiente de pré-produção nem o de produção permitem modificações.
|
||||
Sistemas pequenos podem começar com uma aplicação. Quando a complexidade cresce, separe CRM, tickets, ativos, RH, relatórios ou back-office em aplicações independentes. Planeje usuários, organizações, autenticação, permissões e dados compartilhados.
|
||||
|
||||
~~~text
|
||||
CRM: Desenvolvimento -> Homologação -> Produção
|
||||
Tickets: Desenvolvimento -> Homologação -> Produção
|
||||
Ativos: Desenvolvimento -> Homologação -> Produção
|
||||
~~~
|
||||
|
||||
Documentação relacionada: [Gerenciamento multi-app](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Preparação
|
||||
|
||||
Crie backup antes da produção. Em publicações importantes, teste a restauração em ambiente independente. O backup deve incluir banco, uploads e storage necessário.
|
||||
|
||||
Documentação relacionada: [Backup Manager](../backup-manager/index.mdx).
|
||||
|
||||
## Execução
|
||||
|
||||
Publique primeiro em homologação. Após validação, use o mesmo arquivo de migração em produção.
|
||||
|
||||

|
||||
|
||||
Ao configurar as regras de migração, selecione a regra **"Sobrescrever Prioritariamente"** para as tabelas internas do core e dos plugins, se necessário; para as demais, você pode manter as configurações padrão, caso não haja requisitos especiais.
|
||||
|
||||

|
||||
|
||||
### Múltiplos Ambientes de Desenvolvimento, Lançamento Consolidado
|
||||

|
||||
|
||||
Ideal para cenários de colaboração em equipe ou projetos complexos. Vários ambientes de desenvolvimento paralelos podem ser usados independentemente, e todas as alterações são consolidadas em um único ambiente de pré-produção para testes e validação antes de serem implantadas em produção. Neste processo, também, apenas o ambiente de desenvolvimento pode modificar as configurações — nem o ambiente de pré-produção nem o de produção permitem modificações.
|
||||
Em produção, agende janela de manutenção, avise usuários e evite novas escritas. Em multi-node, reduza para um nó antes da migração. Depois valide fluxos principais e restaure o acesso.
|
||||
|
||||

|
||||
### Regras de migração
|
||||
|
||||
Ao configurar as regras de migração, selecione a regra **"Inserir ou Atualizar Prioritariamente"** para as tabelas internas do core e dos plugins, se necessário; para as demais, você pode manter as configurações padrão, caso não haja requisitos especiais.
|
||||
Estratégias comuns: sobrescrever, somente estrutura e ignorar. Tabelas integradas geralmente seguem a estratégia padrão. Tabelas de negócio definidas pelo usuário normalmente usam somente estrutura. Metadados podem usar sobrescrever conforme o cenário.
|
||||
|
||||

|
||||
Consulte: [Tabelas integradas de aplicações e plugins principais](../migration-manager/built-in-tables.md).
|
||||
|
||||
## Reversão
|
||||
Documentação relacionada: [Gerenciamento de migrações](../migration-manager/index.md).
|
||||
|
||||
Antes de executar uma migração, o sistema cria automaticamente um backup da aplicação atual. Se a migração falhar ou os resultados não forem os esperados, você pode reverter e restaurar através do [Gerenciador de Backup](../backup-manager/index.mdx).
|
||||
## Rollback e recuperação
|
||||
|
||||

|
||||
Se falhar, use primeiro o backup pré-publicação. Restaure no ambiente atual se ele ainda estiver estável; caso contrário, restaure em ambiente independente, valide e altere o tráfego.
|
||||
|
||||
## Documentação relacionada
|
||||
|
||||
- [Variáveis e segredos](../variables-and-secrets/index.md)
|
||||
- [Controle de versão](../version-control/index.md)
|
||||
- [Gerenciamento multi-app](../../multi-app/multi-app/index.md)
|
||||
- [Backup Manager](../backup-manager/index.mdx)
|
||||
- [Migration Manager](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Управление миграциями",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Встроенные таблицы приложений и основных плагинов",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
|
||||
---
|
||||
pkg: '@nocobase/plugin-backups'
|
||||
---
|
||||
|
||||
# Менеджер резервных копий
|
||||
# Управление резервными копиями
|
||||
|
||||
## Введение
|
||||
|
||||
Плагин менеджера резервных копий в NocoBase предоставляет возможности полного резервного копирования базы данных NocoBase и загруженных пользователями файлов, включая планирование резервных копий, скачивание, удаление и восстановление.
|
||||
Плагин NocoBase «Менеджер резервных копий» предоставляет функции полного резервного копирования базы данных NocoBase и загруженных пользователями файлов, а также функции планирования, загрузки, удаления и восстановления резервных копий.
|
||||
|
||||
## Установка клиента базы данных
|
||||
|
||||
Менеджер резервных копий зависит от клиента соответствующей базы данных. Перед использованием скачайте на официальном сайте клиент, соответствующий версии вашей БД:
|
||||
Управление резервными копиями зависит от клиента основной базы данных. Перед использованием убедитесь, что в текущей среде выполнения есть клиент, соответствующий версии базы данных.
|
||||
|
||||
:::tip
|
||||
При установке NocoBase через Docker рекомендуется использовать соответствующий `full`-образ, например `latest-full`, `beta-full` или `alpha-full`. Такие образы уже содержат распространенные клиенты баз данных, поэтому ручная установка обычно не требуется.
|
||||
:::
|
||||
|
||||
Если в текущей среде нет нужного клиента базы данных, скачайте с официального сайта клиент, соответствующий версии вашей базы данных:
|
||||
|
||||
- MySQL: https://dev.mysql.com/downloads/
|
||||
- PostgreSQL: https://www.postgresql.org/download/
|
||||
|
||||
Для Docker-версий можно напрямую создать скрипт в директории `./storage/scripts`:
|
||||
Если нужно установить его вручную в Docker-среде, создайте скрипт в директории `./storage/scripts`:
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
@@ -23,7 +29,7 @@ cd ./storage/scripts
|
||||
vim install-database-client.sh
|
||||
```
|
||||
|
||||
Содержимое `install-database-client.sh`:
|
||||
Содержимое файла `install-database-client.sh` следующее:
|
||||
|
||||
<Tabs>
|
||||
|
||||
@@ -32,7 +38,7 @@ vim install-database-client.sh
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
# Проверяем, установлен ли pg_dump
|
||||
# Check if pg_dump is installed
|
||||
if [ ! -f /usr/bin/pg_dump ]; then
|
||||
echo "pg_dump is not installed, starting PostgreSQL client installation..."
|
||||
|
||||
@@ -48,15 +54,15 @@ deb http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free
|
||||
deb-src http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free
|
||||
EOF
|
||||
|
||||
# Устанавливаем необходимые инструменты и очищаем кэш
|
||||
# Install necessary tools and clean cache
|
||||
rm -rf /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y --no-install-recommends wget gnupg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Настраиваем источник PostgreSQL
|
||||
# Configure PostgreSQL source
|
||||
echo "deb [signed-by=/usr/share/keyrings/pgdg.asc] http://mirrors.aliyun.com/postgresql/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list
|
||||
wget --quiet -O /usr/share/keyrings/pgdg.asc http://mirrors.aliyun.com/postgresql/repos/apt/ACCC4CF8.asc
|
||||
|
||||
# Устанавливаем клиент PostgreSQL
|
||||
# Install PostgreSQL client
|
||||
apt-get update && apt-get install -y --no-install-recommends postgresql-client-16 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -105,7 +111,7 @@ fi
|
||||
|
||||
</Tabs>
|
||||
|
||||
Затем перезапустите контейнер приложения:
|
||||
Затем перезапустите контейнер `app`
|
||||
|
||||
```bash
|
||||
docker compose restart app
|
||||
@@ -113,7 +119,7 @@ docker compose restart app
|
||||
docker compose logs app
|
||||
```
|
||||
|
||||
Проверьте версию клиента БД — она должна совпадать с версией серверной БД:
|
||||
Проверьте номер версии клиента базы данных, он должен совпадать с номером версии сервера базы данных.
|
||||
|
||||
<Tabs>
|
||||
<Tab label="PostgreSQL" name="PostgreSQL">
|
||||
@@ -138,66 +144,65 @@ docker compose exec app bash -c "mysql -V"
|
||||
|
||||
### Создание новой резервной копии
|
||||
|
||||
Нажмите кнопку «Новая резервная копия», чтобы создать новую резервную копию на основе настроек резервного копирования. Статус копии появится в списке.
|
||||
Нажмите кнопку «Создать резервную копию», чтобы создать новую резервную копию в соответствии с настройками и отобразить ее статус в списке резервных копий.
|
||||
|
||||

|
||||
|
||||
### Восстановление резервной копии
|
||||
|
||||
Поддерживается восстановление из списка резервных копий и из локально загруженного файла резервной копии.
|
||||
Восстановление не допускается в следующих случаях:
|
||||
Поддерживается восстановление резервных копий из списка или путем загрузки локального файла резервной копии.
|
||||
Операции восстановления не допускаются в следующих случаях:
|
||||
|
||||
- когда текущая версия NocoBase ниже версии NocoBase в файле резервной копии;
|
||||
- когда текущая база данных NocoBase не совпадает со следующими параметрами в резервной копии:
|
||||
- диалект
|
||||
- стиль подчёркивания
|
||||
- префикс таблиц
|
||||
- схема
|
||||
- когда не включён `Режим совместимости`, а версия БД при создании резервной копии выше, чем текущая версия БД приложения.
|
||||
- Когда текущая версия NocoBase ниже версии NocoBase в файле резервной копии.
|
||||
- Когда текущая база данных NocoBase несовместима со следующими конфигурациями в файле резервной копии:
|
||||
- dialect (тип базы данных)
|
||||
- underscored (конфигурация полей)
|
||||
- table prefix (префикс таблицы)
|
||||
- schema (структура таблицы)
|
||||
- Если не включен режим `Tolerant mode` (режим отказоустойчивости), и версия базы данных на момент создания резервной копии выше, чем текущая версия базы данных приложения.
|
||||
|
||||
> **Восстановление выполняет полную операцию с базой данных. Перед восстановлением рекомендуется сделать резервную копию текущей базы данных.**
|
||||
> **Восстановление — это полная операция с базой данных. Рекомендуется создать резервную копию текущей базы данных перед восстановлением.**
|
||||
|
||||
#### Восстановление из списка резервных копий
|
||||
|
||||
Нажмите кнопку «Восстановить» у нужного элемента в списке, введите пароль шифрования файла резервной копии во всплывающем окне и нажмите «Подтвердить».
|
||||
Нажмите кнопку `Восстановить` для элемента резервной копии в списке, в появившемся окне введите пароль шифрования файла резервной копии и нажмите «Подтвердить», чтобы восстановить резервную копию.
|
||||
|
||||
> Для незашифрованной резервной копии оставьте пароль пустым.
|
||||
> Для незашифрованных резервных копий пароль вводить не нужно.
|
||||
|
||||
> Если нужно восстановить резервную копию в более низкую версию базы данных, включите режим совместимости.
|
||||
> Если вам необходимо восстановить резервную копию в базу данных более старой версии, вам нужно включить режим отказоустойчивости (Tolerant mode).
|
||||
|
||||

|
||||
|
||||
#### Восстановление из локального файла резервной копии
|
||||
|
||||
Нажмите кнопку `Восстановить из локальной резервной копии`, выберите локальный файл резервной копии во всплывающем окне, введите пароль шифрования и нажмите «Подтвердить».
|
||||
Нажмите кнопку `Восстановить из локальной резервной копии`, в появившемся окне выберите локальный файл резервной копии, введите пароль шифрования файла резервной копии и нажмите «Подтвердить», чтобы восстановить резервную копию.
|
||||
|
||||
> Для незашифрованной резервной копии оставьте пароль пустым.
|
||||
> Для незашифрованных резервных копий пароль вводить не нужно.
|
||||
|
||||
> Если нужно восстановить резервную копию в более низкую версию базы данных, включите режим совместимости.
|
||||
> Если вам необходимо восстановить резервную копию в базу данных более старой версии, вам нужно включить режим отказоустойчивости (Tolerant mode).
|
||||
|
||||

|
||||
|
||||
#### Скачивание файла резервной копии
|
||||
#### Загрузка файла резервной копии
|
||||
|
||||
Нажмите кнопку `Скачать` у нужного элемента в списке, чтобы скачать файл резервной копии.
|
||||
Нажмите кнопку `Загрузить` для элемента резервной копии в списке, чтобы загрузить файл резервной копии.
|
||||
|
||||
#### Удаление резервной копии
|
||||
|
||||
Нажмите кнопку `Удалить` у нужного элемента в списке, чтобы удалить файл резервной копии.
|
||||
Нажмите кнопку `Удалить` для элемента резервной копии в списке, чтобы удалить файл резервной копии.
|
||||
|
||||
## Настройки резервного копирования
|
||||
|
||||
Перейдите на вкладку «Настройки», измените параметры резервного копирования и нажмите `Сохранить`.
|
||||
Перейдите на вкладку `Настройки`, измените параметры резервного копирования и нажмите `Сохранить`, чтобы применить изменения.
|
||||
|
||||

|
||||
|
||||
### Описание настроек резервного копирования
|
||||
|
||||
- `Автоматическое резервное копирование`: после включения `Запускать автоматическое резервное копирование по расписанию cron` можно задавать автоматические резервные копии по расписанию.
|
||||
- `Максимальное количество резервных копий`: задаёт максимальное количество локально сохранённых резервных копий. При превышении лимита самые старые резервные копии удаляются автоматически.
|
||||
- `Синхронизация резервной копии с облачным хранилищем`: задаёт облачное хранилище, куда файлы резервных копий автоматически загружаются после успешного резервного копирования.
|
||||
- `Резервное копирование файлов из локального хранилища`: включает или исключает файлы, загруженные пользователями в локальное хранилище сервера (`storage/uploads`), из резервной копии.
|
||||
- `Пароль восстановления`: если задан пароль восстановления, его нужно вводить при восстановлении резервной копии.
|
||||
- `Автоматическое резервное копирование`: После включения опции `Выполнять автоматическое резервное копирование по расписанию Cron` вы сможете настроить автоматическое резервное копирование в указанное время.
|
||||
- `Максимальное количество резервных копий`: Установите максимальное количество локально сохраняемых файлов резервных копий. При превышении этого числа самые старые локальные файлы резервных копий будут автоматически удалены.
|
||||
- `Синхронизировать резервную копию с облачным хранилищем`: Укажите облачное хранилище, куда файлы резервных копий будут автоматически загружаться после успешного создания.
|
||||
- `Резервное копирование файлов локального хранилища`: Определяет, следует ли включать в резервную копию файлы, загруженные пользователями в локальное хранилище сервера (storage/uploads).
|
||||
- `Пароль для восстановления`: Если установлен пароль для восстановления, его необходимо ввести при восстановлении резервной копии.
|
||||
|
||||
> **Пожалуйста, храните пароль для восстановления в надежном месте. Забыв пароль, вы не сможете восстановить файл резервной копии.**
|
||||
> **Надёжно храните пароль восстановления. При его утере восстановить файл резервной копии будет невозможно.**
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Встроенные таблицы приложений и основных плагинов"
|
||||
description: "Справочник встроенных таблиц: стратегии миграции по умолчанию, область управления версиями и обработка резервного копирования/восстановления."
|
||||
keywords: "миграции,управление версиями,резервное копирование,восстановление,встроенные таблицы,NocoBase"
|
||||
---
|
||||
|
||||
# Встроенные таблицы приложений и основных плагинов
|
||||
|
||||
## Введение
|
||||
|
||||
Этот список описывает обычную обработку встроенных таблиц приложений и основных плагинов в миграциях, управлении версиями и резервном копировании/восстановлении. В большинстве случаев не нужно настраивать таблицы по одной. Используйте стратегию по умолчанию.
|
||||
|
||||
Механизмы решают разные задачи:
|
||||
|
||||
- **Управление миграциями**: публикует изменения между окружениями. Частые стратегии: перезапись, только структура и пропуск.
|
||||
- **Управление версиями**: сохраняет и восстанавливает ключевые точки при сборке приложения.
|
||||
- **Резервное копирование/восстановление**: сохраняет и восстанавливает рабочее состояние приложения.
|
||||
|
||||
Столбец «Тип данных» основан на встроенной классификации. Системные базовые данные участвуют в управлении версиями; рабочие бизнес-данные не участвуют; временные runtime-данные не копируются.
|
||||
|
||||
## Справочник встроенных таблиц
|
||||
|
||||
### Database
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | Системные базовые данные | Только структура | Участвует | Копируется |
|
||||
|
||||
### Server
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | Системные базовые данные | Только структура | Участвует | Копируется |
|
||||
|
||||
### System settings
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Client
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `spacesUsers` | Membership between users and spaces | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `collections` | Business collection fields, indexes, and metadata | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `fields` | Field types and constraints under collections | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### China region field
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `flowModels` | Model definitions for the modern flow engine | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `blockTemplates` | Reusable UI block definitions | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Map block
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### ACL
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `rolesResources` | Resources granted to roles | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `issuedTokens` | Issued login or API access tokens | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### API keys
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Users
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Departments
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Рабочие бизнес-данные | Перезапись | Не участвует | Копируется |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Рабочие бизнес-данные | Перезапись | Не участвует | Копируется |
|
||||
| `departmentsUsers` | Relationships between users and departments | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `userDataSyncTasks` | Synchronization task records | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `jobs` | Execution result of each node in a workflow run | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Рабочие бизнес-данные | Перезапись | Не участвует | Копируется |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Рабочие бизнес-данные | Перезапись | Не участвует | Копируется |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Рабочие бизнес-данные | Перезапись | Не участвует | Копируется |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `approvals` | Approval-flow templates and step configuration | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Verification
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `mailSettings` | Mail plugin switches and parameters | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Рабочие бизнес-данные | Перезапись | Не участвует | Копируется |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `mailMessageLabels` | Mail category label definitions | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### AI
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `aiSettings` | AI basic settings | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `aiMessages` | User and assistant messages in conversations | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Временные runtime-данные | Только структура | Не участвует | Не копируется |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Временные runtime-данные | Только структура | Не участвует | Не копируется |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Временные runtime-данные | Только структура | Не участвует | Не копируется |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | Системные базовые данные | Только структура | Участвует | Копируется |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | Системные базовые данные | Только структура | Участвует | Копируется |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Рабочие бизнес-данные | Перезапись | Не участвует | Копируется |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Record history
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `recordHistoryFields` | Fields that need history records | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `recordHistoryTemplate` | Display template for history records | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
| `recordHistories` | Versioned change records for entire records | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### File manager
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `attachments` | File attachment metadata associated with business records | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Localization
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `localizationTranslations` | Actual translated content for each language | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Рабочие бизнес-данные | Только структура | Не участвует | Копируется |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Таблица | Описание | Тип данных | Стратегия по умолчанию | Управление версиями | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | Системные базовые данные | Перезапись | Участвует | Копируется |
|
||||
|
||||
## Пользовательские таблицы
|
||||
|
||||
Пользовательские таблицы по умолчанию считаются бизнес-данными. Обычно мигрируют только структуру.
|
||||
|
||||
Если таблица хранит настройки, категории, шаблоны, правила или метаданные, можно выбрать перезапись по сценарию.
|
||||
|
||||
Если она хранит клиентов, заказы, заявки, согласования, сообщения или журналы, не перезаписывайте production.
|
||||
@@ -1,5 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Управление миграциями"
|
||||
description: "Операционная миграция: перенос конфигурации приложения между окружениями с правилами только структура, перезапись и пропуск. Зависит от управления резервными копиями."
|
||||
keywords: "Управление миграциями,Migration,конфигурация приложения,правила миграции,только структура,перезапись,пропустить,NocoBase"
|
||||
---
|
||||
|
||||
# Менеджер миграций
|
||||
@@ -22,19 +25,15 @@ pkg: '@nocobase/plugin-migration-manager'
|
||||
|
||||
### Встроенные правила
|
||||
|
||||
Менеджер миграций позволяет переносить все таблицы основной базы данных и поддерживает следующие пять встроенных правил:
|
||||
Управление миграциями поддерживает три правила:
|
||||
|
||||
- **Только структура (схема)**: Переносится только структура (схема) таблиц, без вставки или обновления данных.
|
||||
- **Перезапись (очистка и повторная вставка)**: Удаляет все существующие записи из целевой таблицы базы данных, а затем вставляет новые данные.
|
||||
- **Вставка или обновление (Upsert)**: Если запись существует, она обновляется; если нет — вставляется.
|
||||
- **Вставка с игнорированием дубликатов (Insert-ignore)**: При вставке данных, если запись уже существует, она игнорируется (обновление не происходит).
|
||||
- **Пропустить**: Таблица полностью пропускается, никакие действия не выполняются.
|
||||
- **Только структура:** синхронизирует только структуру таблицы, без вставки или обновления данных.
|
||||
- **Перезапись:** очищает существующие записи таблицы, затем вставляет новые данные.
|
||||
- **Пропустить:** не выполняет обработку этой таблицы.
|
||||
|
||||
**Примечания:**
|
||||
|
||||
- Правила «Перезапись», «Вставка или обновление» и «Вставка с игнорированием дубликатов» также синхронизируют изменения структуры таблиц.
|
||||
- Для таблиц с автоинкрементным первичным ключом или без первичного ключа правила «Вставка или обновление» и «Вставка с игнорированием дубликатов» неприменимы.
|
||||
- Правила «Вставка или обновление» и «Вставка с игнорированием дубликатов» используют первичный ключ для определения существования записи.
|
||||
- Перезапись также синхронизирует изменения структуры таблицы.
|
||||
- Пользовательские таблицы с бизнес-данными обычно используют Только структура, чтобы не перезаписать production-данные.
|
||||
|
||||
## Установка
|
||||
|
||||
|
||||
@@ -1,52 +1,87 @@
|
||||
---
|
||||
title: "Управление релизами"
|
||||
description: "Практики релизов: управление версиями, multi-app, резервное копирование и миграции для разработки, staging и production."
|
||||
keywords: "Управление релизами,Release,управление версиями,multi-app,резервное копирование,миграции,NocoBase"
|
||||
---
|
||||
|
||||
# Управление релизами
|
||||
|
||||
## Введение
|
||||
|
||||
В реальных приложениях для обеспечения безопасности данных и стабильности обычно разворачивают несколько окружений: разработки, предрелизное и производственное. В этом документе приведены примеры двух распространённых процессов разработки без кода и подробно объясняется, как реализовать управление релизами в NocoBase.
|
||||
Управление релизами задает повторяемый, проверяемый и восстанавливаемый процесс перехода приложения из разработки в production. Изменения сначала завершаются в разработке, затем проверяются в staging и только после этого публикуются в production. Файлы миграции, резервные копии, логи выполнения и результаты проверки нужно сохранять.
|
||||
|
||||
## Установка
|
||||
~~~text
|
||||
Разработка -> Staging -> Production
|
||||
~~~
|
||||
|
||||
Для управления релизами необходимы три плагина. Убедитесь, что все перечисленные плагины активированы.
|
||||
## Модель релиза
|
||||
|
||||
### Переменные окружения
|
||||
| Возможность | Назначение | Этап |
|
||||
| --- | --- | --- |
|
||||
| Управление версиями | Сохраняет контрольные точки разработки | Разработка |
|
||||
| Переменные и секреты | Разделяет настройки и чувствительные данные | Все окружения |
|
||||
| Multi-app | Разделяет бизнес-модули | Архитектура и команды |
|
||||
| Резервное копирование | Сохраняет восстанавливаемое состояние production | Перед релизом и эксплуатация |
|
||||
| Миграции | Публикуют конфигурацию и структуру | Staging и production |
|
||||
|
||||
- Встроенный плагин, установлен и активирован по умолчанию.
|
||||
- Предоставляет централизованную настройку и управление переменными окружения и ключами для хранения чувствительных данных, переиспользуемых конфигураций и изоляции окружений. ([Документация](../variables-and-secrets/index.md)).
|
||||
## Настройка окружения
|
||||
|
||||
### Менеджер резервных копий
|
||||
Подключения к БД, адреса внешних сервисов, тестовые учетные записи, токены, API Key и Webhook не следует прописывать напрямую в страницах, workflow или настройках плагинов. Используйте переменные и секреты для каждого окружения.
|
||||
|
||||
- Доступен только в профессиональной редакции и выше ([подробнее](https://nocobase.ru/commercial)).
|
||||
- Поддерживает резервное копирование и восстановление, включая плановые резервные копии, обеспечивая безопасность данных и быстрое восстановление. ([Документация](../backup-manager/index.mdx)).
|
||||
Связанная документация: [Переменные и секреты](../variables-and-secrets/index.md).
|
||||
|
||||
### Менеджер миграций
|
||||
## Этап разработки
|
||||
|
||||
- Доступен только в профессиональной редакции и выше ([подробнее](https://nocobase.ru/commercial)).
|
||||
- Используется для миграции конфигурации приложения из одного окружения в другое ([Документация](../migration-manager/index.md)).
|
||||
Создавайте версии до и после значимых изменений моделей данных, страниц, прав, workflow и плагинов. Для публикации между окружениями используйте Migration Manager. Для восстановления production используйте Backup Manager.
|
||||
|
||||
## Распространённые процессы no-code разработки
|
||||
Связанная документация: [Управление версиями](../version-control/index.md).
|
||||
|
||||
### Одно окружение разработки, односторонний релиз
|
||||
## Разделение модулей
|
||||
|
||||
Этот подход подходит для простого процесса разработки. Есть одно окружение разработки, одно предрелизное окружение и одно производственное окружение. Изменения идут из окружения разработки в предрелизное, а затем в производственное. В этом процессе только окружение разработки может изменять конфигурацию — ни предрелизное, ни производственное этого не позволяют.
|
||||
Небольшая система может начинаться с одного приложения. По мере роста сложности разделяйте CRM, заявки, активы, HR, отчеты или операционный backend на отдельные приложения. Заранее спланируйте пользователей, организации, аутентификацию, права и общие данные.
|
||||
|
||||
~~~text
|
||||
CRM: Разработка -> Staging -> Production
|
||||
Заявки: Разработка -> Staging -> Production
|
||||
Активы: Разработка -> Staging -> Production
|
||||
~~~
|
||||
|
||||
Связанная документация: [Управление multi-app](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Подготовка
|
||||
|
||||
Перед релизом в production создайте резервную копию. Для важных релизов проверьте восстановление в отдельном окружении. Копия должна включать БД, загруженные файлы и необходимые данные storage.
|
||||
|
||||
Связанная документация: [Управление резервными копиями](../backup-manager/index.mdx).
|
||||
|
||||
## Выполнение релиза
|
||||
|
||||
Сначала публикуйте в staging. После успешной проверки используйте тот же файл миграции в production.
|
||||
|
||||

|
||||
|
||||
При настройке правил миграции при необходимости выберите **«Перезапись»** для встроенных таблиц ядра и плагинов; для остальных таблиц можно оставить значения по умолчанию, если нет специальных требований.
|
||||
|
||||

|
||||
|
||||
### Несколько окружений разработки, объединённый релиз
|
||||

|
||||
|
||||
Этот подход подходит для многопользовательской разработки или сложных проектов. Несколько параллельных окружений разработки могут использоваться независимо, а все изменения объединяются в одно предрелизное окружение для тестирования и проверки перед развёртыванием в производственное. В этом процессе только окружение разработки может изменять конфигурацию — ни предрелизное, ни производственное этого не позволяют.
|
||||
В production запланируйте окно обслуживания, уведомите пользователей и остановите новые записи данных. В multi-node развертывании перед миграцией уменьшите приложение до одного узла. После миграции проверьте основные процессы и верните доступ.
|
||||
|
||||

|
||||
### Правила миграции
|
||||
|
||||
При настройке правил миграции при необходимости выберите **«Обновить или вставить»** для встроенных таблиц ядра и плагинов; для остальных таблиц можно оставить значения по умолчанию, если нет специальных требований.
|
||||
Частые стратегии: перезапись, только структура и пропуск. Встроенные таблицы обычно используют стратегию по умолчанию. Пользовательские таблицы с бизнес-данными обычно мигрируют только структуру. Таблицы с метаданными можно перезаписывать по сценарию.
|
||||
|
||||

|
||||
См.: [Встроенные таблицы приложений и основных плагинов](../migration-manager/built-in-tables.md).
|
||||
|
||||
## Откат
|
||||
Связанная документация: [Управление миграциями](../migration-manager/index.md).
|
||||
|
||||
Перед выполнением миграции система автоматически создаёт резервную копию текущего приложения. Если миграция завершилась неуспешно или результат не соответствует ожиданиям, можно выполнить откат через [менеджер резервных копий](../backup-manager/index.mdx).
|
||||
## Откат и восстановление
|
||||
|
||||

|
||||
При сбое сначала используйте резервную копию перед релизом. Если текущее окружение стабильно, восстановите его там. Если нет, восстановите отдельное окружение, проверьте ключевые процессы и переключите трафик.
|
||||
|
||||
## Связанная документация
|
||||
|
||||
- [Переменные и секреты](../variables-and-secrets/index.md)
|
||||
- [Управление версиями](../version-control/index.md)
|
||||
- [Управление multi-app](../../multi-app/multi-app/index.md)
|
||||
- [Управление резервными копиями](../backup-manager/index.mdx)
|
||||
- [Управление миграциями](../migration-manager/index.md)
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
"type": "custom-link",
|
||||
"label": "Quản lý di chuyển",
|
||||
"link": "/ops-management/migration-manager/"
|
||||
},
|
||||
{
|
||||
"type": "custom-link",
|
||||
"label": "Bảng tích hợp của ứng dụng và plugin chính",
|
||||
"link": "/ops-management/migration-manager/built-in-tables/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-backups'
|
||||
title: "Quản lý Sao lưu"
|
||||
description: "Sao lưu quản lý vận hành: sao lưu đầy đủ database và file người dùng, sao lưu định kỳ, tải xóa khôi phục, hỗ trợ MySQL/PostgreSQL, cần cài đặt database client, tính năng phiên bản chuyên nghiệp."
|
||||
description: "Sao lưu quản lý vận hành: sao lưu đầy đủ database và file người dùng, sao lưu định kỳ, tải xóa khôi phục, hỗ trợ MySQL/PostgreSQL, cần xác nhận database client khả dụng."
|
||||
keywords: "Quản lý sao lưu,Backup,sao lưu dữ liệu,sao lưu định kỳ,khôi phục sao lưu,MySQL PostgreSQL,quản lý vận hành,NocoBase"
|
||||
---
|
||||
# Quản lý Sao lưu
|
||||
@@ -12,12 +12,18 @@ Plugin Backup Manager của NocoBase cung cấp các tính năng sao lưu đầy
|
||||
|
||||
## Cài đặt database client
|
||||
|
||||
Backup Manager phụ thuộc vào client của database chính tương ứng, trước khi sử dụng vui lòng vào trang chủ tải client phù hợp với phiên bản database đang sử dụng:
|
||||
Backup Manager phụ thuộc vào database client của database chính. Trước khi sử dụng, hãy xác nhận runtime environment hiện tại đã có client phù hợp với phiên bản database.
|
||||
|
||||
:::tip
|
||||
Khi cài đặt NocoBase bằng Docker, nên dùng image `full` tương ứng, ví dụ `latest-full`, `beta-full` hoặc `alpha-full`. Các image này đã tích hợp database client phổ biến, nên thông thường không cần cài đặt thủ công.
|
||||
:::
|
||||
|
||||
Nếu môi trường hiện tại chưa có database client cần thiết, hãy tải client phù hợp với phiên bản database từ website chính thức:
|
||||
|
||||
- MySQL: https://dev.mysql.com/downloads/
|
||||
- PostgreSQL: https://www.postgresql.org/download/
|
||||
|
||||
Phiên bản Docker, có thể trực tiếp viết một đoạn script trong thư mục `./storage/scripts`
|
||||
Nếu cần cài đặt thủ công trong môi trường Docker, có thể viết một đoạn script trong thư mục `./storage/scripts`
|
||||
|
||||
```bash
|
||||
mkdir ./storage/scripts
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
---
|
||||
title: "Bảng tích hợp của ứng dụng và plugin chính"
|
||||
description: "Tài liệu tham khảo bảng tích hợp, chiến lược mặc định của Migration Manager, phạm vi quản lý phiên bản và cách xử lý backup/restore."
|
||||
keywords: "Migration Manager,quản lý phiên bản,backup restore,bảng tích hợp,NocoBase"
|
||||
---
|
||||
|
||||
# Bảng tích hợp của ứng dụng và plugin chính
|
||||
|
||||
## Giới thiệu
|
||||
|
||||
Danh sách này mô tả cách xử lý phổ biến của các bảng tích hợp trong ứng dụng và plugin chính khi migration, quản lý phiên bản và backup/restore. Phần lớn trường hợp người dùng không cần chỉnh từng bảng. Hãy dùng chiến lược mặc định.
|
||||
|
||||
Các cơ chế có trọng tâm khác nhau:
|
||||
|
||||
- **Migration Manager**: dùng để phát hành giữa các môi trường. Chiến lược phổ biến gồm ghi đè, chỉ cấu trúc và bỏ qua.
|
||||
- **Quản lý phiên bản**: lưu và khôi phục các mốc quan trọng khi xây dựng ứng dụng.
|
||||
- **Backup/restore**: sao lưu và khôi phục trạng thái runtime của ứng dụng.
|
||||
|
||||
Cột “Loại dữ liệu” đến từ phân loại tích hợp. Dữ liệu nền tảng hệ thống tham gia quản lý phiên bản; dữ liệu runtime nghiệp vụ không tham gia; dữ liệu tạm runtime không được backup.
|
||||
|
||||
## Tham khảo bảng tích hợp
|
||||
|
||||
### Database
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrations` | Executed ORM/SQL migration versions | Dữ liệu nền tảng hệ thống | Chỉ cấu trúc | Tham gia | Backup |
|
||||
|
||||
### Server
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `applicationPlugins` | Plugin list and versions loaded by the application | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `applicationVersion` | Application and core version used for upgrade and compatibility checks | Dữ liệu nền tảng hệ thống | Chỉ cấu trúc | Tham gia | Backup |
|
||||
|
||||
### System settings
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `systemSettings` | Installation-level system parameters and feature switches | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Client
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `desktopRoutes` | Desktop menu and route structure | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Multi-space
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `spaces` | Top-level containers for space or workspace isolation | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `spacesUsers` | Membership between users and spaces | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### App monitoring
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apps` | Application entries managed by the app monitoring plugin | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Main data source
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `collectionCategories` | UI grouping for business collections | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `collections` | Business collection fields, indexes, and metadata | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `fields` | Field types and constraints under collections | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Data source manager
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `dataSources` | Main or external database connection configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `dataSourcesCollections` | Mapping for synced tables or collections from external sources | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `dataSourcesFields` | Mapping between external fields and NocoBase fields | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `dataSourcesRoles` | Access roles at data-source level | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `dataSourcesRolesResources` | Collections and operations accessible by roles | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `dataSourcesRolesResourcesActions` | Allowed actions such as create, read, update, and delete | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `dataSourcesRolesResourcesScopes` | Row-level or filter-scope restrictions | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### External database connections
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `databaseServers` | Registered database instances available for connection | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Visual data modeling
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `graphPositions` | Node positions in graph or flow editors | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### China region field
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `chinaRegions` | Province, city, and district geographic dictionary | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Auto-number field
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `sequences` | Sequence table for auto-generated business numbers | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### UI Schema
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `uiButtonSchemasRoles` | Relationship between button permissions and roles | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `uiSchemaServerHooks` | Server-side hook extension points for UI configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `uiSchemaTemplates` | Reusable form and detail layout fragments | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `uiSchemaTreePath` | Materialized paths for component-tree hierarchy | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `uiSchemas` | JSON layout definitions for pages and blocks | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### UI templates
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTemplateUsages` | Entities instantiated from a flow template | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `flowModelTemplates` | Reusable flow-structure templates | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Flow engine
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flowModelTreePath` | Materialized paths for flow-model tree structures | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `flowModels` | Model definitions for the modern flow engine | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `flowSql` | SQL snippets or scripts registered in flows | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Block templates
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `blockTemplateLinks` | Relationships between pages and block templates | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `blockTemplates` | Reusable UI block definitions | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### iframe block
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `iframeHtml` | HTML configuration required by embedded iframes | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Mobile
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mobileRoutes` | Mobile app menus and routes | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Theme editor
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `themeConfig` | Light/dark themes and brand colors | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Map block
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mapConfiguration` | Map widget center, zoom, and base-map configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Public forms
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `publicForms` | External forms and submission-entry configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Template printing
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `printingTemplates` | Print layouts for list or detail views | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### ACL
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `roles` | Role definitions for permission sets | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `rolesResources` | Resources granted to roles | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `rolesResourcesActions` | Actions allowed on resources, such as view and update | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `rolesResourcesScopes` | Data filter scopes visible to roles | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `rolesUsers` | Many-to-many relationship between users and roles | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Authentication
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `authenticators` | Password and third-party login method configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `tokenControlConfig` | Session duration and refresh strategy | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `issuedTokens` | Issued login or API access tokens | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `tokenBlacklist` | Tokens that have been logged out or forcibly invalidated | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `usersAuthenticators` | Bindings between users and authentication methods | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Two-factor authentication
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `twoFactorAuthSettings` | 2FA methods and user-level switches | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### API keys
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `apiKeys` | Open API keys and permission scopes | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Password policy
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `passwordPolicy` | Password complexity and expiration policies | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `lockedUsers` | Accounts temporarily locked by policy | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `userPasswordHistory` | Recent password hashes used to prevent reuse | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### IP restriction
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `ipRestrictionConfig` | IP allowlist or blocklist rules | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Users
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `users` | Login accounts, profiles, and basic status | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Departments
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `departments` | Department tree in the organization structure | Dữ liệu runtime nghiệp vụ | Ghi đè | Không tham gia | Backup |
|
||||
| `departmentsRoles` | Bindings between departments and default roles | Dữ liệu runtime nghiệp vụ | Ghi đè | Không tham gia | Backup |
|
||||
| `departmentsUsers` | Relationships between users and departments | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### User data sync
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `userDataSyncSources` | External identity source or account-system connection configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `userDataSyncRecords` | Execution records for synchronization jobs | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `userDataSyncRecordsResources` | Tables or resources involved in synchronization jobs | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `userDataSyncTasks` | Synchronization task records | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Workflow
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `flow_nodes` | Workflow nodes | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `workflows` | Automation flow charts, triggers, and node configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `jobs` | Execution result of each node in a workflow run | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `executions` | Status, inputs, outputs, and log indexes for workflow runs | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `userWorkflowTasks` | Task-count statistics for users | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `workflowCategories` | Workflow grouping in the UI | Dữ liệu runtime nghiệp vụ | Ghi đè | Không tham gia | Backup |
|
||||
| `workflowCategoryRelations` | Many-to-many relationship between workflows and categories | Dữ liệu runtime nghiệp vụ | Ghi đè | Không tham gia | Backup |
|
||||
| `workflowStats` | Aggregated metrics such as run count and success rate | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `workflowTasks` | Task execution records for automation nodes | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `workflowVersionStats` | Execution and performance statistics by workflow version | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Workflow approval
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `approvalAudienceUsers` | Relationship between approval audiences and users | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `approvalAudiences` | Approval notification or participation scope grouped by role or user | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `approvalExecutions` | Runtime status and current node of an approval flow | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `approvalMsgTpls` | Message templates for approval notices and tasks | Dữ liệu runtime nghiệp vụ | Ghi đè | Không tham gia | Backup |
|
||||
| `approvalRecords` | Approval tasks and processing results from a personal view | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `approvals` | Approval-flow templates and step configuration | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Workflow manual node
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowManualTasks` | Manual-node tasks that require human handling | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Workflow CC
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `workflowCcTasks` | Read-only copied workflow tasks | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Notification manager
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationChannels` | Delivery channel configuration such as in-app messages and email | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `notificationSendLogs` | Delivery status and failure reason for notifications | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### In-app messages
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `notificationInAppMessages` | In-app messages received by users | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Verification
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `verifiers` | Configuration for who can initiate or complete verification | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `otpRecords` | SMS or email OTP issue and verification records | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `usersVerifiers` | Bindings between users and verification channels or entities | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Mail manager
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `mailGeneralSettings` | Global mail behavior and default values | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `mailSettings` | Mail plugin switches and parameters | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `mailAccounts` | Sending mailbox accounts and SMTP configuration | Dữ liệu runtime nghiệp vụ | Ghi đè | Không tham gia | Backup |
|
||||
| `mailMassMessages` | Mass-mail tasks and recipient batches | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `mailMessageLabels` | Mail category label definitions | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `mailMessageNotes` | Internal notes for individual emails | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `mailMessages` | Indexes for synced or sent email content | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `mailTemplates` | HTML/text templates for notification emails | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `mailmessagelabelsMailmessages` | Join table between emails and many-to-many labels | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `mailmessagelabelsMailmessagesRel` | Auxiliary fields or extension table for mail-label relationships | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### AI
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiEmployees` | AI employee profiles: nickname, skills, models, knowledge bases, and related configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `aiSettings` | AI basic settings | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `rolesAiEmployees` | Relationship between AI employees and roles | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `llmServices` | LLM providers and model endpoint configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `aiContextDatasources` | Business collections, fields, and filters queryable by AI employees | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `aiConversations` | Conversation context for sessions, topics, and message threads | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `aiFiles` | Uploaded files and storage references generated by the AI plugin | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `aiMessages` | User and assistant messages in conversations | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `aiToolMessages` | Requests and responses for function or tool calls | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `usersAiEmployees` | Relationship between user custom prompts and AI employees | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `lcCheckpointBlobs` | Binary blocks for LLM conversation checkpoints | Dữ liệu tạm runtime | Chỉ cấu trúc | Không tham gia | Không backup |
|
||||
| `lcCheckpointWrites` | Incremental checkpoint write records | Dữ liệu tạm runtime | Chỉ cấu trúc | Không tham gia | Không backup |
|
||||
| `lcCheckpoints` | LangGraph checkpoint metadata for recoverable conversations | Dữ liệu tạm runtime | Chỉ cấu trúc | Không tham gia | Không backup |
|
||||
|
||||
### AI knowledge base
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `aiKnowledgeBaseDocs` | Document chunks and index metadata stored in knowledge bases | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `aiKnowledgeBase` | Knowledge-base type, external ID, and base information | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `aiVectorDatabases` | Vector database service and connection configuration | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `aiVectorStoreConfig` | Relationship between vector database connections and embedding models | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `environmentVariables` | Deployment-related key-value entries, such as secret placeholder names | Dữ liệu nền tảng hệ thống | Chỉ cấu trúc | Tham gia | Backup |
|
||||
|
||||
### Migration manager
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `migrationRules` | Rules and scope configuration in the migration manager | Dữ liệu nền tảng hệ thống | Chỉ cấu trúc | Tham gia | Backup |
|
||||
|
||||
### Backup manager
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `backupSettings` | Automatic backup and retention policy | Dữ liệu runtime nghiệp vụ | Ghi đè | Không tham gia | Backup |
|
||||
|
||||
### Audit logs
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `auditTrails` | Trace of who operated on which resources and when | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Async tasks
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `asyncTasks` | Queue, status, and result of long-running tasks | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Record history
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `recordHistoryCollections` | Collections with field history enabled | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `recordHistoryFields` | Fields that need history records | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `recordHistoryTemplate` | Display template for history records | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `recordFieldHistories` | Historical values and timeline for field changes | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `recordFieldSnapshots` | Snapshot proof of field values at a point in time | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
| `recordHistories` | Versioned change records for entire records | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### File manager
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `storages` | Local, S3, OSS, and other storage bucket configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `attachments` | File attachment metadata associated with business records | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Localization
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localizationTexts` | Keys and default text awaiting translation | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `localizationTranslations` | Actual translated content for each language | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Localization tester
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `localeTester` | Entries used for localization debugging or testing | Dữ liệu runtime nghiệp vụ | Chỉ cấu trúc | Không tham gia | Backup |
|
||||
|
||||
### Custom request
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customRequests` | Custom HTTP request actions with URL and method configuration | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
| `customRequestsRoles` | Roles allowed to call custom requests | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
### Custom variables
|
||||
|
||||
| Bảng | Mô tả | Loại dữ liệu | Chiến lược mặc định | Quản lý phiên bản | Backup/restore |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| `customVariables` | Variable definitions and default values available to flows or globally | Dữ liệu nền tảng hệ thống | Ghi đè | Tham gia | Backup |
|
||||
|
||||
## Bảng do người dùng tạo
|
||||
|
||||
Bảng do người dùng tạo mặc định được xem là dữ liệu nghiệp vụ. Thường chỉ cần migration cấu trúc và chọn chỉ cấu trúc.
|
||||
|
||||
Nếu bảng lưu cấu hình, phân loại, template, rule hoặc metadata, có thể chọn ghi đè theo bối cảnh nghiệp vụ.
|
||||
|
||||
Nếu bảng lưu khách hàng, đơn hàng, ticket, bản ghi phê duyệt, tin nhắn hoặc log, nên tránh ghi đè dữ liệu production.
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
pkg: '@nocobase/plugin-migration-manager'
|
||||
title: "Quản lý Migration"
|
||||
description: "Quản lý vận hành migration: di chuyển cấu hình application từ một environment sang environment khác, hỗ trợ các quy tắc migration như chỉ structure, ghi đè, Upsert, insert bỏ qua trùng lặp, skip, phụ thuộc plugin Backup Manager."
|
||||
keywords: "Quản lý Migration,Migration,di chuyển cấu hình application,quy tắc migration,Upsert,migration database,quản lý vận hành,NocoBase"
|
||||
description: "Migration vận hành: di chuyển cấu hình ứng dụng từ môi trường này sang môi trường khác, hỗ trợ quy tắc chỉ cấu trúc, ghi đè và bỏ qua. Phụ thuộc Backup Manager."
|
||||
keywords: "Quản lý Migration,Migration,cấu hình ứng dụng,quy tắc migration,chỉ cấu trúc,ghi đè,bỏ qua,NocoBase"
|
||||
---
|
||||
# Quản lý Migration
|
||||
|
||||
@@ -29,17 +29,15 @@ Di chuyển data table và dữ liệu của database chính theo quy tắc migr
|
||||
|
||||
### Quy tắc tích hợp sẵn
|
||||
|
||||
Hỗ trợ năm quy tắc migration sau:
|
||||
Migration Manager hỗ trợ ba quy tắc sau:
|
||||
|
||||
- **Chỉ structure:** Chỉ đồng bộ structure data table, không liên quan đến việc insert hoặc update dữ liệu.
|
||||
- **Ghi đè (xóa trắng và insert lại):** Xóa trắng record của table hiện tại, sau đó insert dữ liệu mới.
|
||||
- **Insert hoặc Update (Upsert):** Phán đoán theo primary key, nếu record tồn tại thì update, nếu không tồn tại thì insert.
|
||||
- **Insert bỏ qua trùng lặp:** Insert record mới, nếu primary key bị trùng thì bỏ qua (không update record hiện tại).
|
||||
- **Skip:** Không xử lý gì cho table này.
|
||||
- **Chỉ cấu trúc:** Chỉ đồng bộ cấu trúc bảng, không insert hoặc update dữ liệu.
|
||||
- **Ghi đè:** Xóa record hiện có của bảng, sau đó insert dữ liệu mới.
|
||||
- **Bỏ qua:** Không xử lý gì với bảng này.
|
||||
|
||||
**Ghi chú:**
|
||||
- Ghi đè, Insert hoặc Update, Insert bỏ qua trùng lặp cũng sẽ đồng bộ thay đổi structure table.
|
||||
- Table có ID tự tăng làm primary key hoặc không có primary key không hỗ trợ "Insert hoặc Update" và "Insert bỏ qua trùng lặp".
|
||||
- Ghi đè cũng đồng bộ thay đổi cấu trúc bảng.
|
||||
- Bảng dữ liệu nghiệp vụ do người dùng tạo thường chọn chỉ cấu trúc để tránh ghi đè dữ liệu production.
|
||||
|
||||
### Thiết kế chi tiết
|
||||
|
||||
@@ -49,6 +47,8 @@ Hỗ trợ năm quy tắc migration sau:
|
||||
|
||||
Cấu hình quy tắc migration
|
||||
|
||||
Để xem các bảng tương ứng với chiến lược mặc định, tham khảo: [Bảng tích hợp của ứng dụng và plugin chính](./built-in-tables.md).
|
||||
|
||||

|
||||
|
||||
Bật quy tắc độc lập
|
||||
|
||||
@@ -1,58 +1,87 @@
|
||||
---
|
||||
title: "Quản lý phát hành"
|
||||
description: "Quy trình phát hành quản lý vận hành: triển khai đa môi trường development, staging, production, kết hợp plugin Variables & Secrets, Backup Manager, Migration Manager, quy trình phát hành môi trường development đơn/nhiều, cấu hình quy tắc migration."
|
||||
keywords: "Quản lý phát hành,Release,triển khai đa môi trường,development staging production,quy tắc migration,quản lý vận hành,NocoBase"
|
||||
description: "Thực hành phát hành: quản lý phiên bản, multi-app, Backup Manager và Migration Manager cho development, staging và production."
|
||||
keywords: "Quản lý phát hành,Release,quản lý phiên bản,multi-app,Backup Manager,Migration Manager,NocoBase"
|
||||
---
|
||||
|
||||
# Quản lý phát hành
|
||||
|
||||
## Giới thiệu
|
||||
|
||||
Trong ứng dụng thực tế, để đảm bảo bảo mật dữ liệu và vận hành ổn định của ứng dụng, chúng ta thường cần triển khai nhiều môi trường, ví dụ môi trường development, môi trường staging và môi trường production. Tài liệu này sẽ lấy hai quy trình phát triển no-code phổ biến làm ví dụ để mô tả chi tiết cách thực hiện quản lý phát hành trong NocoBase.
|
||||
Quản lý phát hành định nghĩa quy trình đưa ứng dụng từ development đến production theo cách có thể lặp lại, kiểm chứng và khôi phục. Hoàn tất thay đổi ở development, kiểm tra ở staging, rồi mới phát hành lên production. Cần lưu file migration, bản backup, log thực thi và kết quả kiểm tra.
|
||||
|
||||
## Cài đặt
|
||||
~~~text
|
||||
Development -> Staging -> Production
|
||||
~~~
|
||||
|
||||
Ba plugin cần thiết cho quản lý phát hành, vui lòng đảm bảo đã kích hoạt các plugin sau.
|
||||
## Mô hình phát hành
|
||||
|
||||
### Variables & Secrets
|
||||
| Năng lực | Mục đích | Giai đoạn |
|
||||
| --- | --- | --- |
|
||||
| Quản lý phiên bản | Lưu checkpoint trong quá trình phát triển | Development |
|
||||
| Biến và secret | Tách cấu hình và thông tin nhạy cảm theo môi trường | Tất cả môi trường |
|
||||
| Multi-app | Tách module nghiệp vụ | Kiến trúc và cộng tác |
|
||||
| Backup Manager | Lưu trạng thái production có thể khôi phục | Trước phát hành và vận hành |
|
||||
| Migration Manager | Phát hành cấu hình và cấu trúc | Staging và production |
|
||||
|
||||
- Plugin tích hợp sẵn, mặc định cài đặt và kích hoạt.
|
||||
- Cấu hình và quản lý tập trung biến môi trường và secret, dùng cho lưu trữ dữ liệu nhạy cảm, tái sử dụng cấu hình, cô lập cấu hình môi trường ([Xem tài liệu](../variables-and-secrets/index.md)).
|
||||
## Cấu hình môi trường
|
||||
|
||||
### Backup Manager
|
||||
Kết nối database, địa chỉ dịch vụ bên thứ ba, tài khoản test, token, API Key và Webhook không nên hardcode trong page, workflow hoặc cấu hình plugin. Hãy dùng biến và secret riêng cho từng môi trường.
|
||||
|
||||
- Plugin này chỉ khả dụng trong phiên bản chuyên nghiệp trở lên ([Tìm hiểu chi tiết](https://www.nocobase.com/en/commercial)).
|
||||
- Cung cấp tính năng sao lưu và khôi phục, hỗ trợ sao lưu định kỳ, đảm bảo bảo mật dữ liệu và khôi phục nhanh ([Xem tài liệu](../backup-manager/index.mdx)).
|
||||
Tài liệu liên quan: [Biến và Secret](../variables-and-secrets/index.md).
|
||||
|
||||
### Migration Manager
|
||||
## Giai đoạn phát triển
|
||||
|
||||
- Plugin này chỉ khả dụng trong phiên bản chuyên nghiệp trở lên ([Tìm hiểu chi tiết](https://www.nocobase.com/en/commercial)).
|
||||
- Dùng để migrate cấu hình ứng dụng từ một môi trường ứng dụng sang môi trường ứng dụng khác ([Xem tài liệu](../migration-manager/index.md)).
|
||||
Tạo phiên bản trước và sau các thay đổi lớn về data model, page, permission, workflow hoặc plugin. Khi phát hành giữa các môi trường, dùng Migration Manager. Khi cần khôi phục production, dùng Backup Manager.
|
||||
|
||||
## Các quy trình phát triển no-code phổ biến
|
||||
Tài liệu liên quan: [Quản lý phiên bản](../version-control/index.md).
|
||||
|
||||
### Môi trường development đơn, phát hành một chiều
|
||||
## Tách module
|
||||
|
||||
Phù hợp cho quy trình phát triển đơn giản. Mỗi môi trường development, staging và production chỉ có một, các thay đổi được phát hành lần lượt từ môi trường development đến môi trường staging, cuối cùng triển khai vào môi trường production. Trong quy trình này, chỉ môi trường development có thể sửa cấu hình, môi trường staging và production đều không cho phép sửa đổi.
|
||||
Hệ thống nhỏ có thể bắt đầu bằng một app. Khi phức tạp hơn, hãy tách CRM, ticket, tài sản, HR, báo cáo hoặc backend vận hành thành app độc lập. Cần quy hoạch user, tổ chức, xác thực, permission và dữ liệu dùng chung trước.
|
||||
|
||||
~~~text
|
||||
CRM: Development -> Staging -> Production
|
||||
Ticket: Development -> Staging -> Production
|
||||
Tài sản: Development -> Staging -> Production
|
||||
~~~
|
||||
|
||||
Tài liệu liên quan: [Quản lý multi-app](../../multi-app/multi-app/index.md).
|
||||
|
||||
## Chuẩn bị
|
||||
|
||||
Trước khi phát hành production, tạo backup. Với phát hành quan trọng, kiểm tra restore ở môi trường độc lập. Backup cần bao gồm database, file upload và storage cần thiết để ứng dụng chạy.
|
||||
|
||||
Tài liệu liên quan: [Quản lý sao lưu](../backup-manager/index.mdx).
|
||||
|
||||
## Thực thi phát hành
|
||||
|
||||
Phát hành lên staging trước. Sau khi kiểm tra đạt, dùng cùng file migration cho production.
|
||||
|
||||

|
||||
|
||||
Khi cấu hình quy tắc migration, các bảng tích hợp sẵn của kernel và plugin chọn quy tắc "Ưu tiên ghi đè", các bảng khác nếu không có nhu cầu đặc biệt có thể xử lý theo mặc định
|
||||
|
||||

|
||||
|
||||
### Nhiều môi trường development, phát hành hợp nhất
|
||||
|
||||
Phù hợp cho tình huống cộng tác nhiều người hoặc dự án phức tạp. Nhiều môi trường development song song có thể phát triển độc lập, tất cả các thay đổi được hợp nhất thống nhất vào môi trường staging để test và xác minh, cuối cùng phát hành vào môi trường production. Trong quy trình này, cũng chỉ môi trường development có thể sửa cấu hình, môi trường staging và production đều không cho phép sửa đổi.
|
||||
|
||||

|
||||
|
||||
Khi cấu hình quy tắc migration, các bảng tích hợp sẵn của kernel và plugin chọn quy tắc "Ưu tiên insert hoặc update", các bảng khác nếu không có nhu cầu đặc biệt có thể xử lý theo mặc định
|
||||
|
||||

|
||||
|
||||
## Rollback
|
||||
|
||||
Trước khi thực thi migration, sẽ tự động sao lưu ứng dụng hiện tại. Nếu migration thất bại hoặc kết quả không như mong đợi, có thể thông qua [Backup Manager](../backup-manager/index.mdx) để rollback khôi phục.
|
||||
|
||||

|
||||
|
||||
Khi phát hành production, đặt maintenance window, thông báo người dùng và tránh ghi dữ liệu mới. Với multi-node, scale down về một node trước khi migration. Sau đó kiểm tra luồng chính và mở lại truy cập.
|
||||
|
||||
### Quy tắc migration
|
||||
|
||||
Chiến lược phổ biến gồm ghi đè, chỉ cấu trúc và bỏ qua. Bảng tích hợp thường dùng chiến lược mặc định. Bảng dữ liệu nghiệp vụ do người dùng tạo thường chỉ migration cấu trúc. Bảng metadata có thể ghi đè tùy bối cảnh.
|
||||
|
||||
Xem: [Bảng tích hợp của ứng dụng và plugin chính](../migration-manager/built-in-tables.md).
|
||||
|
||||
Tài liệu liên quan: [Quản lý Migration](../migration-manager/index.md).
|
||||
|
||||
## Rollback và khôi phục
|
||||
|
||||
Nếu phát hành thất bại, ưu tiên dùng backup trước phát hành. Nếu môi trường hiện tại còn ổn định, restore tại đó. Nếu không, restore ở môi trường độc lập, kiểm tra luồng chính rồi chuyển traffic.
|
||||
|
||||
## Tài liệu liên quan
|
||||
|
||||
- [Biến và Secret](../variables-and-secrets/index.md)
|
||||
- [Quản lý phiên bản](../version-control/index.md)
|
||||
- [Quản lý multi-app](../../multi-app/multi-app/index.md)
|
||||
- [Quản lý sao lưu](../backup-manager/index.mdx)
|
||||
- [Quản lý Migration](../migration-manager/index.md)
|
||||
|
||||
@@ -11,13 +11,36 @@ import { css } from '@emotion/css';
|
||||
import { defineAction, tExpr } from '@nocobase/flow-engine';
|
||||
import { getPickerFormat } from '@nocobase/utils/client';
|
||||
import { DateFormatCom, ExpiresRadio } from '../components';
|
||||
import {
|
||||
getDateTimeFormatCollectionField,
|
||||
isDateOnlyCollectionField,
|
||||
isTimeCollectionField,
|
||||
resolveDateTimeDisplayProps,
|
||||
} from '../utils/dateTimeDisplayProps';
|
||||
|
||||
const isTableColumnFieldSubModel = (model) => {
|
||||
const parent = model?.parent;
|
||||
return (
|
||||
parent?.subModels?.field === model &&
|
||||
(parent?.use === 'TableColumnModel' || parent?.constructor?.name === 'TableColumnModel')
|
||||
);
|
||||
};
|
||||
|
||||
const syncTableColumnDateTimeFormatProps = (ctx, props) => {
|
||||
const model = ctx.model;
|
||||
if (!isTableColumnFieldSubModel(model) || !model?.parent?.collectionField?.isAssociationField?.()) {
|
||||
return;
|
||||
}
|
||||
|
||||
model.parent.setProps(props);
|
||||
};
|
||||
|
||||
export const dateTimeFormat = defineAction({
|
||||
title: tExpr('Date display format'),
|
||||
name: 'dateDisplayFormat',
|
||||
uiSchema: (ctx) => {
|
||||
const { collectionField } = ctx.model.context as any;
|
||||
const isTimeField = collectionField.type === 'time' || collectionField.interface === 'time';
|
||||
const collectionField = getDateTimeFormatCollectionField({ model: ctx.model });
|
||||
const isTimeField = isTimeCollectionField(collectionField);
|
||||
const timeFormatField = {
|
||||
type: 'string',
|
||||
title: '{{t("Time format")}}',
|
||||
@@ -43,7 +66,7 @@ export const dateTimeFormat = defineAction({
|
||||
(field) => {
|
||||
if (!isTimeField) {
|
||||
const { showTime, picker } = field.form.values || {};
|
||||
field.hidden = !showTime || picker !== 'date';
|
||||
field.hidden = isDateOnlyCollectionField(collectionField) || !showTime || picker !== 'date';
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -146,10 +169,11 @@ export const dateTimeFormat = defineAction({
|
||||
},
|
||||
},
|
||||
(field) => {
|
||||
const { collectionField } = ctx.model.context as any;
|
||||
const collectionField = getDateTimeFormatCollectionField({ model: ctx.model });
|
||||
const { picker } = field.form.values || {};
|
||||
field.hidden = collectionField.type === 'dateOnly' || picker !== 'date';
|
||||
if (picker !== 'date') {
|
||||
const isDateOnlyField = isDateOnlyCollectionField(collectionField);
|
||||
field.hidden = isDateOnlyField || picker !== 'date';
|
||||
if (isDateOnlyField || picker !== 'date') {
|
||||
field.value = false;
|
||||
}
|
||||
},
|
||||
@@ -159,34 +183,24 @@ export const dateTimeFormat = defineAction({
|
||||
};
|
||||
},
|
||||
defaultParams: (ctx: any) => {
|
||||
const { showTime, dateFormat, format, timeFormat, picker }: any = {
|
||||
...ctx.model.context.collectionField.getComponentProps(),
|
||||
...ctx.model.props,
|
||||
};
|
||||
const collectionField = ctx.model.context.collectionField;
|
||||
const isTimeField = collectionField.type === 'time' || collectionField.interface === 'time';
|
||||
const { showTime, dateFormat, timeFormat, picker } = resolveDateTimeDisplayProps({
|
||||
model: ctx.model,
|
||||
withDefaults: true,
|
||||
});
|
||||
return {
|
||||
picker: picker || 'date',
|
||||
dateFormat: dateFormat || 'YYYY-MM-DD',
|
||||
timeFormat: timeFormat || (isTimeField ? format : undefined) || 'HH:mm:ss',
|
||||
timeFormat: timeFormat || 'HH:mm:ss',
|
||||
showTime,
|
||||
};
|
||||
},
|
||||
async beforeParamsSave(ctx: any, params) {
|
||||
const props = resolveDateTimeDisplayProps({ model: ctx.model, params });
|
||||
ctx.model.setProps(props);
|
||||
syncTableColumnDateTimeFormatProps(ctx, props);
|
||||
await ctx.model.save?.();
|
||||
},
|
||||
handler(ctx: any, params) {
|
||||
const { collectionField } = ctx.model.context as any;
|
||||
const isTimeField = collectionField.type === 'time' || collectionField.interface === 'time';
|
||||
if (isTimeField) {
|
||||
const timeFormat = params?.timeFormat || params?.format || 'HH:mm:ss';
|
||||
ctx.model.setProps({
|
||||
...params,
|
||||
timeFormat,
|
||||
format: timeFormat,
|
||||
});
|
||||
} else {
|
||||
ctx.model.setProps({
|
||||
...params,
|
||||
format: params?.showTime ? `${params.dateFormat} ${params.timeFormat}` : params.dateFormat,
|
||||
});
|
||||
}
|
||||
ctx.model.setProps(resolveDateTimeDisplayProps({ model: ctx.model, params }));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
import React, { type ComponentType, type CSSProperties, type ReactNode } from 'react';
|
||||
import { DateFilterDynamicComponent } from '../../models/blocks/filter-form/fields/date-time/components/DateFilterDynamicComponent';
|
||||
import { translateOptions } from './enumOptionsUtils';
|
||||
|
||||
type OperatorMeta = {
|
||||
value?: string;
|
||||
@@ -26,6 +27,7 @@ type OperatorComponentFieldModel = {
|
||||
props?: Record<string, unknown>;
|
||||
render?: () => ReactNode;
|
||||
__originalRender?: () => ReactNode;
|
||||
translate?: (text: string) => string;
|
||||
};
|
||||
|
||||
type OperatorComponentRenderOptions = {
|
||||
@@ -93,6 +95,17 @@ export function restoreOperatorComponentRender(fieldModel?: unknown) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function translateComponentOptions(props: Record<string, unknown>, translate: ((text: string) => string) | undefined) {
|
||||
if (!Array.isArray(props.options) || typeof translate !== 'function') {
|
||||
return props;
|
||||
}
|
||||
|
||||
return {
|
||||
...props,
|
||||
options: translateOptions(props.options, translate),
|
||||
};
|
||||
}
|
||||
|
||||
export function applyOperatorComponentRender({
|
||||
app,
|
||||
fieldModel,
|
||||
@@ -118,8 +131,9 @@ export function applyOperatorComponentRender({
|
||||
mutableFieldModel.render = () => {
|
||||
const fieldProps = mutableFieldModel.props || {};
|
||||
const fieldStyle = pickOperatorStyle(fieldProps.style);
|
||||
const componentProps =
|
||||
const mergedProps =
|
||||
propsPriority === 'operator' ? { ...fieldProps, ...operatorProps } : { ...operatorProps, ...fieldProps };
|
||||
const componentProps = translateComponentOptions(mergedProps, mutableFieldModel.translate);
|
||||
const componentStyle =
|
||||
propsPriority === 'operator' ? { ...fieldStyle, ...operatorStyle } : { ...operatorStyle, ...fieldStyle };
|
||||
const mergedStyle = { ...(style || {}), ...componentStyle };
|
||||
|
||||
+56
-1
@@ -18,12 +18,23 @@ type TestFieldModel = {
|
||||
setupReactiveRender: ReturnType<typeof vi.fn>;
|
||||
_reactiveWrapperCache?: unknown;
|
||||
__originalRender?: () => React.ReactNode;
|
||||
translate?: (text: string) => string;
|
||||
};
|
||||
|
||||
const MultipleKeywordsInput = (props: Record<string, unknown>) => {
|
||||
return <div data-testid="multiple-keywords-input" {...props} />;
|
||||
};
|
||||
|
||||
const Select = (props: Record<string, unknown>) => {
|
||||
return <div data-testid="select" {...props} />;
|
||||
};
|
||||
|
||||
function mockT(text: string) {
|
||||
if (text === '{{t("Yes")}}') return '是';
|
||||
if (text === '{{t("No")}}') return '否';
|
||||
return text;
|
||||
}
|
||||
|
||||
function createFieldModel() {
|
||||
return {
|
||||
props: {
|
||||
@@ -52,7 +63,10 @@ function createFilterItemModel({
|
||||
collectionField,
|
||||
context: {
|
||||
app: {
|
||||
getComponent: (name: string) => (name === 'MultipleKeywordsInput' ? MultipleKeywordsInput : undefined),
|
||||
getComponent: (name: string) => {
|
||||
if (name === 'MultipleKeywordsInput') return MultipleKeywordsInput;
|
||||
if (name === 'Select') return Select;
|
||||
},
|
||||
},
|
||||
collectionField,
|
||||
},
|
||||
@@ -112,6 +126,47 @@ describe('customizeFilterRender action', () => {
|
||||
expect((rerenderedElement as React.ReactElement).props.placeholder).toBe('updated runtime placeholder');
|
||||
});
|
||||
|
||||
it('translates operator schema select options', () => {
|
||||
const fieldModel = {
|
||||
...createFieldModel(),
|
||||
translate: mockT,
|
||||
};
|
||||
const model = createFilterItemModel({
|
||||
fieldModel,
|
||||
operator: '$isTruly',
|
||||
collectionField: {
|
||||
interface: 'checkbox',
|
||||
type: 'boolean',
|
||||
filterable: {
|
||||
operators: [
|
||||
{
|
||||
label: '{{t("Yes")}}',
|
||||
value: '$isTruly',
|
||||
schema: {
|
||||
'x-component': 'Select',
|
||||
'x-component-props': {
|
||||
options: [
|
||||
{ label: '{{t("Yes")}}', value: true },
|
||||
{ label: '{{t("No")}}', value: false },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
customizeFilterRender.handler?.({ model } as any);
|
||||
|
||||
const element = fieldModel.render();
|
||||
expect((element as React.ReactElement).type).toBe(Select);
|
||||
expect((element as React.ReactElement).props.options).toEqual([
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false },
|
||||
]);
|
||||
});
|
||||
|
||||
it('restores original render when switching to an operator without a schema component', () => {
|
||||
const fieldModel = createFieldModel();
|
||||
const originalRender = fieldModel.render;
|
||||
|
||||
@@ -35,6 +35,7 @@ import { ErrorBoundary } from 'react-error-boundary';
|
||||
import { getRowKey } from './utils';
|
||||
import { getSavedAssociationTitleField, getTableColumnSortField } from './sortUtils';
|
||||
import { getFieldBindingUse, rebuildFieldSubModel } from '../../../internal/utils/rebuildFieldSubModel';
|
||||
import { getSavedDateTimeFormatParams, resolveDateTimeDisplayProps } from '../../../utils/dateTimeDisplayProps';
|
||||
|
||||
export function FieldDeletePlaceholder(props: any) {
|
||||
const { t } = useTranslation();
|
||||
@@ -128,6 +129,15 @@ export const CustomWidth = ({ setOpen, t, handleChange, defaultValue }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const resetDateTimeDisplayProps = {
|
||||
dateOnly: undefined,
|
||||
dateFormat: undefined,
|
||||
format: undefined,
|
||||
picker: undefined,
|
||||
showTime: undefined,
|
||||
timeFormat: undefined,
|
||||
};
|
||||
|
||||
export class TableColumnModel extends DisplayItemModel {
|
||||
// 标记:该类的 render 返回函数, 避免错误的reactive封装
|
||||
static renderMode: ModelRenderMode = ModelRenderMode.RenderFunction;
|
||||
@@ -353,11 +363,22 @@ TableColumnModel.registerFlow({
|
||||
return;
|
||||
}
|
||||
const titleField = getSavedAssociationTitleField(ctx.model);
|
||||
const fieldModel = Array.isArray(ctx.model.subModels.field) ? undefined : ctx.model.subModels.field;
|
||||
const targetCollectionField = collectionField.targetCollection?.getField?.(titleField);
|
||||
const savedDateTimeDisplayProps = getSavedDateTimeFormatParams(fieldModel)
|
||||
? resolveDateTimeDisplayProps({
|
||||
model: fieldModel,
|
||||
collectionField,
|
||||
titleField,
|
||||
currentProps: ctx.model.props,
|
||||
})
|
||||
: undefined;
|
||||
const componentProps =
|
||||
collectionField.isAssociationField() && titleField
|
||||
? {
|
||||
...collectionField.getComponentProps(),
|
||||
...collectionField.targetCollection?.getField?.(titleField)?.getComponentProps?.(),
|
||||
...targetCollectionField?.getComponentProps?.(),
|
||||
...savedDateTimeDisplayProps,
|
||||
}
|
||||
: collectionField.getComponentProps();
|
||||
ctx.model.setProps('title', collectionField.title);
|
||||
@@ -539,21 +560,33 @@ TableColumnModel.registerFlow({
|
||||
typeof binding?.defaultProps === 'function'
|
||||
? binding.defaultProps(ctx, targetCollectionField)
|
||||
: binding?.defaultProps;
|
||||
const componentProps = targetCollectionField.getComponentProps?.() || {};
|
||||
const nextFieldProps = {
|
||||
...(defaultProps || {}),
|
||||
...componentProps,
|
||||
titleField: params.label,
|
||||
};
|
||||
const nextColumnProps = {
|
||||
...resetDateTimeDisplayProps,
|
||||
...nextFieldProps,
|
||||
};
|
||||
if (targetUse && targetUse !== currentUse) {
|
||||
await rebuildFieldSubModel({
|
||||
parentModel: ctx.model as any,
|
||||
targetUse,
|
||||
defaultProps,
|
||||
defaultProps: nextFieldProps,
|
||||
fieldSettingsInit,
|
||||
});
|
||||
} else if (fieldModel) {
|
||||
fieldModel.setProps(nextColumnProps);
|
||||
fieldModel.setStepParams('fieldSettings', 'init', fieldSettingsInit);
|
||||
await fieldModel.dispatchEvent('beforeRender', undefined, { useCache: false });
|
||||
await fieldModel.save();
|
||||
}
|
||||
if (targetUse) {
|
||||
ctx.model.setStepParams('tableColumnSettings', 'model', { use: targetUse });
|
||||
}
|
||||
ctx.model.setProps(targetCollectionField.getComponentProps());
|
||||
ctx.model.setProps(nextColumnProps);
|
||||
},
|
||||
defaultParams: (ctx: any) => {
|
||||
const titleField = ctx.model?.context?.collectionField?.targetCollectionTitleFieldName;
|
||||
|
||||
+159
-1
@@ -130,9 +130,14 @@ describe('TableColumnModel sorter settings', () => {
|
||||
const titleFieldStep = model.getFlow('tableColumnSettings')?.steps?.fieldNames as any;
|
||||
const setStepParams = vi.fn();
|
||||
const setProps = vi.fn();
|
||||
const setFieldProps = vi.fn();
|
||||
const dispatchEvent = vi.fn();
|
||||
const saveFieldModel = vi.fn();
|
||||
const targetCollectionField = {
|
||||
getComponentProps: () => ({}),
|
||||
getComponentProps: () => ({
|
||||
format: 'hh:mm:ss a',
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
}),
|
||||
};
|
||||
|
||||
await titleFieldStep.beforeParamsSave(
|
||||
@@ -156,8 +161,10 @@ describe('TableColumnModel sorter settings', () => {
|
||||
subModels: {
|
||||
field: {
|
||||
use: 'DisplayTextFieldModel',
|
||||
setProps: setFieldProps,
|
||||
setStepParams,
|
||||
dispatchEvent,
|
||||
save: saveFieldModel,
|
||||
},
|
||||
},
|
||||
setStepParams,
|
||||
@@ -169,6 +176,155 @@ describe('TableColumnModel sorter settings', () => {
|
||||
);
|
||||
|
||||
expect(setStepParams).toHaveBeenCalledWith('tableColumnSettings', 'model', { use: 'DisplayTextFieldModel' });
|
||||
expect(setFieldProps).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
format: 'hh:mm:ss a',
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
titleField: 'code',
|
||||
}),
|
||||
);
|
||||
expect(setProps).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
format: 'hh:mm:ss a',
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
titleField: 'code',
|
||||
}),
|
||||
);
|
||||
expect(saveFieldModel).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('clears stale datetime display props when association title field changes to date only', async () => {
|
||||
const engine = new FlowEngine();
|
||||
const model = new TableColumnModel({ uid: 'table-column-title-field-date-only', flowEngine: engine } as any);
|
||||
const titleFieldStep = model.getFlow('tableColumnSettings')?.steps?.fieldNames as any;
|
||||
const setStepParams = vi.fn();
|
||||
const setProps = vi.fn();
|
||||
const setFieldProps = vi.fn();
|
||||
const targetCollectionField = {
|
||||
getComponentProps: () => ({
|
||||
dateOnly: true,
|
||||
showTime: false,
|
||||
}),
|
||||
};
|
||||
|
||||
await titleFieldStep.beforeParamsSave(
|
||||
{
|
||||
collectionField: {
|
||||
isAssociationField: () => true,
|
||||
targetCollection: {
|
||||
name: 'departments',
|
||||
getField: () => targetCollectionField,
|
||||
},
|
||||
},
|
||||
model: {
|
||||
collectionField: {
|
||||
dataSourceKey: 'main',
|
||||
},
|
||||
constructor: {
|
||||
getDefaultBindingByField: () => ({
|
||||
modelName: 'DisplayDateTimeFieldModel',
|
||||
}),
|
||||
},
|
||||
subModels: {
|
||||
field: {
|
||||
use: 'DisplayDateTimeFieldModel',
|
||||
setProps: setFieldProps,
|
||||
setStepParams,
|
||||
dispatchEvent: vi.fn(),
|
||||
save: vi.fn(),
|
||||
},
|
||||
},
|
||||
setStepParams,
|
||||
setProps,
|
||||
},
|
||||
},
|
||||
{ label: 'dateOnly' },
|
||||
{ label: 'time' },
|
||||
);
|
||||
|
||||
expect(setFieldProps).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
dateOnly: true,
|
||||
format: undefined,
|
||||
showTime: false,
|
||||
timeFormat: undefined,
|
||||
titleField: 'dateOnly',
|
||||
}),
|
||||
);
|
||||
expect(setProps).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
dateOnly: true,
|
||||
format: undefined,
|
||||
showTime: false,
|
||||
timeFormat: undefined,
|
||||
titleField: 'dateOnly',
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps saved association title datetime format when table column initializes again', async () => {
|
||||
const engine = new FlowEngine();
|
||||
const model = new TableColumnModel({
|
||||
uid: 'table-column-title-field-saved-datetime-format',
|
||||
flowEngine: engine,
|
||||
} as any);
|
||||
const initStep = model.getFlow('tableColumnSettings')?.steps?.init as any;
|
||||
const setProps = vi.fn();
|
||||
const targetCollectionField = {
|
||||
getComponentProps: () => ({
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
showTime: true,
|
||||
timeFormat: 'HH:mm:ss',
|
||||
}),
|
||||
};
|
||||
|
||||
await initStep.handler({
|
||||
model: {
|
||||
context: {
|
||||
collectionField: {
|
||||
title: 'Shipments',
|
||||
name: 'shipments',
|
||||
isAssociationField: () => true,
|
||||
getComponentProps: () => ({
|
||||
fieldNames: {
|
||||
label: 'shipmentsDatetime',
|
||||
},
|
||||
}),
|
||||
targetCollection: {
|
||||
getField: () => targetCollectionField,
|
||||
},
|
||||
},
|
||||
},
|
||||
props: {
|
||||
titleField: 'shipmentsDatetime',
|
||||
},
|
||||
subModels: {
|
||||
field: {
|
||||
getStepParams: (flowKey, stepKey) =>
|
||||
flowKey === 'datetimeSettings' && stepKey === 'dateFormat'
|
||||
? {
|
||||
picker: 'date',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: true,
|
||||
timeFormat: 'h:mm a',
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
},
|
||||
applySubModelsBeforeRenderFlows: vi.fn(),
|
||||
setProps,
|
||||
},
|
||||
});
|
||||
|
||||
expect(setProps).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
format: 'YYYY-MM-DD h:mm a',
|
||||
showTime: true,
|
||||
timeFormat: 'h:mm a',
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it('does not update field component setting when title field refresh fails', async () => {
|
||||
@@ -203,8 +359,10 @@ describe('TableColumnModel sorter settings', () => {
|
||||
subModels: {
|
||||
field: {
|
||||
use: 'DisplayTextFieldModel',
|
||||
setProps: vi.fn(),
|
||||
setStepParams: vi.fn(),
|
||||
dispatchEvent: vi.fn().mockRejectedValue(new Error('beforeRender failed')),
|
||||
save: vi.fn(),
|
||||
},
|
||||
},
|
||||
setStepParams,
|
||||
|
||||
@@ -197,6 +197,11 @@ export class ClickableFieldModel extends FieldModel {
|
||||
titleField,
|
||||
overflowMode,
|
||||
disabled,
|
||||
dateOnly,
|
||||
dateFormat,
|
||||
format,
|
||||
picker,
|
||||
showTime,
|
||||
timeFormat,
|
||||
...restProps
|
||||
} = this.props;
|
||||
|
||||
@@ -8,14 +8,42 @@
|
||||
*/
|
||||
|
||||
import { DisplayItemModel, tExpr } from '@nocobase/flow-engine';
|
||||
import { getDateTimeFormat, getPickerFormat } from '@nocobase/utils/client';
|
||||
import dayjs from 'dayjs';
|
||||
import React from 'react';
|
||||
import { ClickableFieldModel } from './ClickableFieldModel';
|
||||
|
||||
const stripTimeFromFormat = (format?: string) =>
|
||||
format ? format.replace(/\s*[Hh]{1,2}:mm(?::ss)?(?:\.SSS)?(?:\s*[aA])?/g, '').trim() : format;
|
||||
|
||||
interface DisplayDateTimeFormatProps {
|
||||
dateOnly?: boolean;
|
||||
picker?: string;
|
||||
format?: string;
|
||||
dateFormat?: string;
|
||||
showTime?: boolean;
|
||||
timeFormat?: string;
|
||||
}
|
||||
|
||||
const resolveDisplayDateTimeFormat = (props: DisplayDateTimeFormatProps) => {
|
||||
const { dateOnly, picker = 'date', format, dateFormat, showTime, timeFormat } = props;
|
||||
const normalizedFormat = stripTimeFromFormat(format);
|
||||
if (picker !== 'date') {
|
||||
return dateFormat || normalizedFormat || getPickerFormat(picker);
|
||||
}
|
||||
|
||||
if (!dateOnly && !dateFormat && typeof showTime === 'undefined' && !timeFormat && normalizedFormat) {
|
||||
return format;
|
||||
}
|
||||
|
||||
const normalizedDateFormat = dateFormat || normalizedFormat || getPickerFormat(picker);
|
||||
return getDateTimeFormat(picker, normalizedDateFormat, showTime, timeFormat);
|
||||
};
|
||||
|
||||
export class DisplayDateTimeFieldModel extends ClickableFieldModel {
|
||||
public renderComponent(value) {
|
||||
const { className, style } = this.props;
|
||||
const finalFormat = this.props.format;
|
||||
const finalFormat = resolveDisplayDateTimeFormat(this.props);
|
||||
let formattedValue = '';
|
||||
if (value) {
|
||||
const day = dayjs(value);
|
||||
|
||||
@@ -15,17 +15,20 @@ import { MobileSelect } from './mobile-components/MobileSelect';
|
||||
import { enumToOptions, getSelectedEnumLabels, translateOptionLabel } from '../../internal/utils/enumOptionsUtils';
|
||||
|
||||
const getOriginalEnumOptions = (model: SelectFieldModel) => {
|
||||
const fromEnum = enumToOptions(model.context.collectionField?.uiSchema?.enum, (text) => text) || [];
|
||||
const fromEnum = enumToOptions(model.context.collectionField?.uiSchema?.enum, model.translate) || [];
|
||||
if (fromEnum.length > 0) {
|
||||
return fromEnum.map((option) => ({ ...option }));
|
||||
}
|
||||
const current = Array.isArray(model.props.options) ? model.props.options : [];
|
||||
return current.map((option) => ({ ...option }));
|
||||
return current.map((option) => ({
|
||||
...option,
|
||||
label: translateOptionLabel(option.label, model.translate),
|
||||
}));
|
||||
};
|
||||
|
||||
export class SelectFieldModel extends FieldModel {
|
||||
render() {
|
||||
const fallbackOptions = getOriginalEnumOptions(this);
|
||||
|
||||
const options = this.props.options?.map((v) => {
|
||||
return {
|
||||
...v,
|
||||
@@ -46,7 +49,6 @@ export class SelectFieldModel extends FieldModel {
|
||||
if (this.context.isMobileLayout) {
|
||||
return <MobileSelect {...this.props} options={options} displayValue={value} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Select
|
||||
{...this.props}
|
||||
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* This file is part of the NocoBase (R) project.
|
||||
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
||||
* Authors: NocoBase Team.
|
||||
*
|
||||
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||
*/
|
||||
|
||||
import { FlowEngine } from '@nocobase/flow-engine';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { DisplayDateTimeFieldModel } from '../DisplayDateTimeFieldModel';
|
||||
|
||||
describe('DisplayDateTimeFieldModel', () => {
|
||||
it('uses dateFormat, showTime, and timeFormat when rendering read pretty datetime text', () => {
|
||||
const engine = new FlowEngine();
|
||||
engine.registerModels({ DisplayDateTimeFieldModel });
|
||||
|
||||
const model = engine.createModel<DisplayDateTimeFieldModel>({
|
||||
use: DisplayDateTimeFieldModel,
|
||||
uid: 'display-datetime-field-format',
|
||||
props: {
|
||||
value: '2026-06-15 13:05:06',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: true,
|
||||
timeFormat: 'HH:mm:ss',
|
||||
},
|
||||
});
|
||||
|
||||
render(model.render());
|
||||
|
||||
expect(screen.getByText('2026-06-15 13:05:06')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('does not reuse a time-only format when rendering datetime text', () => {
|
||||
const engine = new FlowEngine();
|
||||
engine.registerModels({ DisplayDateTimeFieldModel });
|
||||
|
||||
const model = engine.createModel<DisplayDateTimeFieldModel>({
|
||||
use: DisplayDateTimeFieldModel,
|
||||
uid: 'display-datetime-field-stale-time-format',
|
||||
props: {
|
||||
value: '2026-06-15 13:05:06',
|
||||
format: 'HH:mm:ss',
|
||||
showTime: true,
|
||||
timeFormat: 'HH:mm:ss',
|
||||
},
|
||||
});
|
||||
|
||||
render(model.render());
|
||||
|
||||
expect(screen.getByText('2026-06-15 13:05:06')).toBeInTheDocument();
|
||||
expect(screen.queryByText('13:05:06')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('keeps an existing complete datetime format when no split format props are configured', () => {
|
||||
const engine = new FlowEngine();
|
||||
engine.registerModels({ DisplayDateTimeFieldModel });
|
||||
|
||||
const model = engine.createModel<DisplayDateTimeFieldModel>({
|
||||
use: DisplayDateTimeFieldModel,
|
||||
uid: 'display-datetime-field-complete-format',
|
||||
props: {
|
||||
value: '2026-06-15 13:05:06',
|
||||
format: 'YYYY/MM/DD HH:mm:ss',
|
||||
},
|
||||
});
|
||||
|
||||
render(model.render());
|
||||
|
||||
expect(screen.getByText('2026/06/15 13:05:06')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders only the date for date-only fields even when a datetime format remains', () => {
|
||||
const engine = new FlowEngine();
|
||||
engine.registerModels({ DisplayDateTimeFieldModel });
|
||||
|
||||
const model = engine.createModel<DisplayDateTimeFieldModel>({
|
||||
use: DisplayDateTimeFieldModel,
|
||||
uid: 'display-datetime-field-date-only',
|
||||
props: {
|
||||
value: '2026-06-15 13:05:06',
|
||||
dateOnly: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
showTime: false,
|
||||
timeFormat: 'HH:mm:ss',
|
||||
},
|
||||
});
|
||||
|
||||
render(model.render());
|
||||
|
||||
expect(screen.getByText('2026-06-15')).toBeInTheDocument();
|
||||
expect(screen.queryByText('2026-06-15 13:05:06')).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* This file is part of the NocoBase (R) project.
|
||||
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
||||
* Authors: NocoBase Team.
|
||||
*
|
||||
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { SelectFieldModel } from '../SelectFieldModel';
|
||||
|
||||
function mockT(text: string) {
|
||||
if (text === '{{t("Yes")}}') return '是';
|
||||
if (text === '{{t("No")}}') return '否';
|
||||
return text;
|
||||
}
|
||||
|
||||
describe('SelectFieldModel', () => {
|
||||
it('translates enum fallback labels for selected values', () => {
|
||||
const model = {
|
||||
props: {
|
||||
value: true,
|
||||
},
|
||||
context: {
|
||||
collectionField: {
|
||||
uiSchema: {
|
||||
enum: [
|
||||
{ label: '{{t("Yes")}}', value: true },
|
||||
{ label: '{{t("No")}}', value: false },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
translate: mockT,
|
||||
} as unknown as SelectFieldModel;
|
||||
|
||||
const element = SelectFieldModel.prototype.render.call(model) as React.ReactElement;
|
||||
|
||||
expect(element.props.value).toEqual({ label: '是', value: true });
|
||||
});
|
||||
});
|
||||
@@ -48,6 +48,264 @@ describe('dateTimeFormat', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('uses the association title field when deciding the format schema', () => {
|
||||
const ctx = {
|
||||
model: {
|
||||
props: {
|
||||
titleField: 'shipmentsTime',
|
||||
},
|
||||
context: {
|
||||
collectionField: {
|
||||
type: 'belongsTo',
|
||||
targetCollection: {
|
||||
getField: (name) =>
|
||||
name === 'shipmentsTime'
|
||||
? {
|
||||
type: 'time',
|
||||
interface: 'time',
|
||||
}
|
||||
: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
expect(Object.keys(dateTimeFormat.uiSchema(ctx))).toEqual(['timeFormat']);
|
||||
});
|
||||
|
||||
it('saves association title time field format as a time format', () => {
|
||||
const setProps = vi.fn();
|
||||
const ctx = {
|
||||
model: {
|
||||
props: {
|
||||
titleField: 'shipmentsTime',
|
||||
},
|
||||
context: {
|
||||
collectionField: {
|
||||
type: 'belongsTo',
|
||||
targetCollection: {
|
||||
getField: (name) =>
|
||||
name === 'shipmentsTime'
|
||||
? {
|
||||
type: 'time',
|
||||
interface: 'time',
|
||||
}
|
||||
: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
setProps,
|
||||
},
|
||||
};
|
||||
|
||||
dateTimeFormat.handler(ctx, { timeFormat: 'hh:mm:ss a' });
|
||||
|
||||
expect(setProps).toHaveBeenCalledWith({
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
format: 'hh:mm:ss a',
|
||||
});
|
||||
});
|
||||
|
||||
it('applies and persists date time format params when settings are saved', async () => {
|
||||
const setProps = vi.fn();
|
||||
const save = vi.fn();
|
||||
const ctx = {
|
||||
model: {
|
||||
props: {
|
||||
titleField: 'shipmentsDatetime',
|
||||
},
|
||||
context: {
|
||||
collectionField: {
|
||||
type: 'belongsTo',
|
||||
targetCollection: {
|
||||
getField: (name) =>
|
||||
name === 'shipmentsDatetime'
|
||||
? {
|
||||
type: 'datetime',
|
||||
interface: 'datetime',
|
||||
}
|
||||
: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
setProps,
|
||||
save,
|
||||
},
|
||||
};
|
||||
|
||||
await dateTimeFormat.beforeParamsSave(ctx, {
|
||||
picker: 'date',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: true,
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
});
|
||||
|
||||
expect(setProps).toHaveBeenCalledWith({
|
||||
picker: 'date',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: true,
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
format: 'YYYY-MM-DD hh:mm:ss a',
|
||||
});
|
||||
expect(save).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('syncs table association column props when title date time format settings are saved', async () => {
|
||||
const setProps = vi.fn();
|
||||
const save = vi.fn();
|
||||
const setParentProps = vi.fn();
|
||||
const model = {
|
||||
props: {
|
||||
titleField: 'shipmentsDatetime',
|
||||
},
|
||||
context: {
|
||||
collectionField: {
|
||||
type: 'belongsTo',
|
||||
targetCollection: {
|
||||
getField: (name) =>
|
||||
name === 'shipmentsDatetime'
|
||||
? {
|
||||
type: 'datetime',
|
||||
interface: 'datetime',
|
||||
}
|
||||
: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
setProps,
|
||||
save,
|
||||
parent: {
|
||||
use: 'TableColumnModel',
|
||||
collectionField: {
|
||||
isAssociationField: () => true,
|
||||
},
|
||||
setProps: setParentProps,
|
||||
},
|
||||
};
|
||||
model.parent['subModels'] = {
|
||||
field: model,
|
||||
};
|
||||
|
||||
await dateTimeFormat.beforeParamsSave(
|
||||
{ model },
|
||||
{
|
||||
picker: 'date',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: true,
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
},
|
||||
);
|
||||
|
||||
expect(setParentProps).toHaveBeenCalledWith({
|
||||
picker: 'date',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: true,
|
||||
timeFormat: 'hh:mm:ss a',
|
||||
format: 'YYYY-MM-DD hh:mm:ss a',
|
||||
});
|
||||
expect(save).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('hides time format for association title date-only fields', () => {
|
||||
const ctx = {
|
||||
model: {
|
||||
props: {
|
||||
titleField: 'shipmentsDateOnly',
|
||||
showTime: true,
|
||||
},
|
||||
context: {
|
||||
collectionField: {
|
||||
type: 'belongsTo',
|
||||
targetCollection: {
|
||||
getField: (name) =>
|
||||
name === 'shipmentsDateOnly'
|
||||
? {
|
||||
type: 'dateOnly',
|
||||
interface: 'date',
|
||||
getComponentProps: () => ({
|
||||
dateOnly: true,
|
||||
showTime: false,
|
||||
}),
|
||||
}
|
||||
: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
const schema = dateTimeFormat.uiSchema(ctx);
|
||||
const timeFormatField: any = schema.timeFormat;
|
||||
const showTimeField: any = schema.showTime;
|
||||
const timeFormatState = {
|
||||
hidden: false,
|
||||
form: {
|
||||
values: {
|
||||
picker: 'date',
|
||||
showTime: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
const showTimeState = {
|
||||
hidden: false,
|
||||
value: true,
|
||||
form: {
|
||||
values: {
|
||||
picker: 'date',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
timeFormatField['x-reactions'][0](timeFormatState);
|
||||
showTimeField['x-reactions'][1](showTimeState);
|
||||
|
||||
expect(timeFormatState.hidden).toBe(true);
|
||||
expect(showTimeState.hidden).toBe(true);
|
||||
expect(showTimeState.value).toBe(false);
|
||||
expect(dateTimeFormat.defaultParams(ctx)).toMatchObject({
|
||||
showTime: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('saves association title date-only field format without time even when params contain showTime', () => {
|
||||
const setProps = vi.fn();
|
||||
const ctx = {
|
||||
model: {
|
||||
props: {
|
||||
titleField: 'shipmentsDateOnly',
|
||||
},
|
||||
context: {
|
||||
collectionField: {
|
||||
type: 'belongsTo',
|
||||
targetCollection: {
|
||||
getField: (name) =>
|
||||
name === 'shipmentsDateOnly'
|
||||
? {
|
||||
type: 'dateOnly',
|
||||
interface: 'date',
|
||||
}
|
||||
: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
setProps,
|
||||
},
|
||||
};
|
||||
|
||||
dateTimeFormat.handler(ctx, {
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: true,
|
||||
timeFormat: 'HH:mm:ss',
|
||||
});
|
||||
|
||||
expect(setProps).toHaveBeenCalledWith({
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
showTime: false,
|
||||
timeFormat: 'HH:mm:ss',
|
||||
format: 'YYYY-MM-DD',
|
||||
});
|
||||
});
|
||||
|
||||
it('uses format as the default time format when timeFormat is missing', () => {
|
||||
const ctx = {
|
||||
model: {
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* This file is part of the NocoBase (R) project.
|
||||
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
||||
* Authors: NocoBase Team.
|
||||
*
|
||||
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||
*/
|
||||
|
||||
import type { FlowModelContext } from '@nocobase/flow-engine';
|
||||
|
||||
type DateTimeDisplayProps = {
|
||||
dateOnly?: boolean;
|
||||
dateFormat?: string;
|
||||
format?: string;
|
||||
picker?: string;
|
||||
showTime?: boolean;
|
||||
timeFormat?: string;
|
||||
};
|
||||
|
||||
type DateTimeCollectionField = {
|
||||
type?: string;
|
||||
interface?: string;
|
||||
getComponentProps?: () => DateTimeDisplayProps;
|
||||
targetCollection?: {
|
||||
getField?: (name?: string) => DateTimeCollectionField | undefined;
|
||||
};
|
||||
};
|
||||
|
||||
type DateTimeModelContext = FlowModelContext & {
|
||||
collectionField?: DateTimeCollectionField;
|
||||
};
|
||||
|
||||
type DateTimeModel = {
|
||||
props?: DateTimeDisplayProps & {
|
||||
titleField?: string;
|
||||
};
|
||||
context?: DateTimeModelContext;
|
||||
getStepParams?: (flowKey: string, stepKey: string) => DateTimeDisplayProps | undefined;
|
||||
};
|
||||
|
||||
type ResolveDateTimeDisplayPropsOptions = {
|
||||
model?: DateTimeModel;
|
||||
collectionField?: DateTimeCollectionField;
|
||||
titleField?: string;
|
||||
currentProps?: DateTimeDisplayProps;
|
||||
params?: DateTimeDisplayProps;
|
||||
withDefaults?: boolean;
|
||||
};
|
||||
|
||||
const dateTimeDisplayPropKeys: Array<keyof DateTimeDisplayProps> = [
|
||||
'dateOnly',
|
||||
'dateFormat',
|
||||
'format',
|
||||
'picker',
|
||||
'showTime',
|
||||
'timeFormat',
|
||||
];
|
||||
|
||||
const pickDateTimeDisplayProps = (source?: DateTimeDisplayProps) => {
|
||||
if (!source) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const result: DateTimeDisplayProps = {};
|
||||
for (const key of dateTimeDisplayPropKeys) {
|
||||
if (key === 'dateOnly' || key === 'showTime') {
|
||||
if (typeof source[key] !== 'undefined') {
|
||||
result[key] = source[key];
|
||||
}
|
||||
} else if (typeof source[key] !== 'undefined') {
|
||||
result[key] = source[key];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
const stripUndefined = (props: DateTimeDisplayProps) =>
|
||||
Object.fromEntries(Object.entries(props).filter(([, value]) => typeof value !== 'undefined')) as DateTimeDisplayProps;
|
||||
|
||||
const getModelCollectionField = (model?: DateTimeModel) => model?.context?.collectionField;
|
||||
|
||||
export const getDateTimeFormatCollectionField = (options: ResolveDateTimeDisplayPropsOptions) => {
|
||||
const collectionField = options.collectionField || getModelCollectionField(options.model);
|
||||
const titleField = options.titleField || options.model?.props?.titleField;
|
||||
return collectionField?.targetCollection?.getField?.(titleField) || collectionField;
|
||||
};
|
||||
|
||||
export const isTimeCollectionField = (collectionField?: DateTimeCollectionField) =>
|
||||
collectionField?.type === 'time' || collectionField?.interface === 'time';
|
||||
|
||||
export const isDateOnlyCollectionField = (collectionField?: DateTimeCollectionField) =>
|
||||
collectionField?.type === 'dateOnly' || collectionField?.interface === 'dateOnly';
|
||||
|
||||
export const getSavedDateTimeFormatParams = (model?: DateTimeModel) =>
|
||||
model?.getStepParams?.('datetimeSettings', 'dateFormat') || model?.getStepParams?.('timeSettings', 'dateFormat');
|
||||
|
||||
export const resolveDateTimeDisplayProps = (options: ResolveDateTimeDisplayPropsOptions) => {
|
||||
const collectionField = options.collectionField || getModelCollectionField(options.model);
|
||||
const targetCollectionField = getDateTimeFormatCollectionField(options);
|
||||
const mergedProps = {
|
||||
...pickDateTimeDisplayProps(collectionField?.getComponentProps?.()),
|
||||
...pickDateTimeDisplayProps(
|
||||
targetCollectionField !== collectionField ? targetCollectionField?.getComponentProps?.() : undefined,
|
||||
),
|
||||
...pickDateTimeDisplayProps(options.currentProps || options.model?.props),
|
||||
...pickDateTimeDisplayProps(getSavedDateTimeFormatParams(options.model)),
|
||||
...pickDateTimeDisplayProps(options.params),
|
||||
};
|
||||
|
||||
if (isTimeCollectionField(targetCollectionField)) {
|
||||
const timeFormat = mergedProps.timeFormat || mergedProps.format || 'HH:mm:ss';
|
||||
return stripUndefined({
|
||||
...mergedProps,
|
||||
timeFormat,
|
||||
format: timeFormat,
|
||||
});
|
||||
}
|
||||
|
||||
const picker = mergedProps.picker || (options.withDefaults ? 'date' : undefined);
|
||||
const dateFormat = mergedProps.dateFormat || (options.withDefaults ? 'YYYY-MM-DD' : undefined);
|
||||
const timeFormat = mergedProps.timeFormat || (options.withDefaults ? 'HH:mm:ss' : undefined);
|
||||
const showTime = isDateOnlyCollectionField(targetCollectionField) ? false : mergedProps.showTime;
|
||||
const finalDateFormat = dateFormat || 'YYYY-MM-DD';
|
||||
const finalTimeFormat = timeFormat || 'HH:mm:ss';
|
||||
|
||||
return stripUndefined({
|
||||
...mergedProps,
|
||||
picker,
|
||||
dateFormat,
|
||||
timeFormat,
|
||||
showTime,
|
||||
format: showTime ? `${finalDateFormat} ${finalTimeFormat}` : finalDateFormat,
|
||||
});
|
||||
};
|
||||
@@ -13,6 +13,14 @@
|
||||
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/audit-logs",
|
||||
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/audit-logs",
|
||||
"license": "Apache-2.0",
|
||||
"nocobase": {
|
||||
"deprecated": true,
|
||||
"internal": true,
|
||||
"supportedVersions": [
|
||||
"1.x"
|
||||
],
|
||||
"editionLevel": 0
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design/icons": "5.x",
|
||||
"@formily/antd-v5": "1.x",
|
||||
|
||||
@@ -18,7 +18,12 @@
|
||||
"directory": "packages/plugins/plugin-backup-restore"
|
||||
},
|
||||
"nocobase": {
|
||||
"deprecated": true
|
||||
"deprecated": true,
|
||||
"internal": true,
|
||||
"supportedVersions": [
|
||||
"1.x"
|
||||
],
|
||||
"editionLevel": 0
|
||||
},
|
||||
"devDependencies": {
|
||||
"@koa/multer": "^3.0.2",
|
||||
|
||||
@@ -11,5 +11,13 @@
|
||||
"keywords": [
|
||||
"system"
|
||||
],
|
||||
"nocobase": {
|
||||
"deprecated": true,
|
||||
"internal": true,
|
||||
"supportedVersions": [
|
||||
"1.x"
|
||||
],
|
||||
"editionLevel": 0
|
||||
},
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
"@nocobase/test": "2.x",
|
||||
"@nocobase/utils": "2.x"
|
||||
},
|
||||
"nocobase": {
|
||||
"deprecated": true,
|
||||
"internal": true,
|
||||
"supportedVersions": [
|
||||
"1.x"
|
||||
],
|
||||
"editionLevel": 0
|
||||
},
|
||||
"devDependencies": {
|
||||
"pg": "^8.11.3"
|
||||
},
|
||||
|
||||
@@ -24,6 +24,13 @@
|
||||
"react-i18next": "^11.15.1",
|
||||
"react-router-dom": "^6.11.2"
|
||||
},
|
||||
"nocobase": {
|
||||
"deprecated": true,
|
||||
"supportedVersions": [
|
||||
"1.x"
|
||||
],
|
||||
"editionLevel": 0
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nocobase/client": "2.x",
|
||||
"@nocobase/database": "2.x",
|
||||
|
||||
@@ -16,7 +16,12 @@
|
||||
"react-i18next": "^11.15.1"
|
||||
},
|
||||
"nocobase": {
|
||||
"deprecated": true
|
||||
"deprecated": true,
|
||||
"internal": true,
|
||||
"supportedVersions": [
|
||||
"1.x"
|
||||
],
|
||||
"editionLevel": 0
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nocobase/client": "2.x",
|
||||
|
||||
@@ -13,6 +13,14 @@
|
||||
"homepage": "https://docs.nocobase.com/handbook/field-snapshot",
|
||||
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/field-snapshot",
|
||||
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/field-snapshot",
|
||||
"nocobase": {
|
||||
"deprecated": true,
|
||||
"internal": true,
|
||||
"supportedVersions": [
|
||||
"1.x"
|
||||
],
|
||||
"editionLevel": 0
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design/icons": "5.x",
|
||||
"@formily/core": "2.x",
|
||||
|
||||
+17
-16
@@ -78,6 +78,15 @@ const buildTriggerWorkflows = (group?: TriggerWorkflowBinding[]) => {
|
||||
: undefined;
|
||||
};
|
||||
|
||||
function ensureTriggerWorkflowsConfigured(ctx: FlowRuntimeContext, group?: TriggerWorkflowBinding[]) {
|
||||
if (group?.length) {
|
||||
return true;
|
||||
}
|
||||
ctx.message.error(ctx.t('Button is not configured properly, please contact the administrator.', { ns: NAMESPACE }));
|
||||
ctx.exit();
|
||||
return false;
|
||||
}
|
||||
|
||||
function getRecordKey(record, collection) {
|
||||
if (!record || !collection) {
|
||||
return null;
|
||||
@@ -293,11 +302,7 @@ FormTriggerWorkflowActionModel.registerFlow({
|
||||
},
|
||||
}),
|
||||
async handler(ctx, params) {
|
||||
if (!params.group?.length) {
|
||||
ctx.message.error(
|
||||
ctx.t('Button is not configured properly, please contact the administrator.', { ns: NAMESPACE }),
|
||||
);
|
||||
ctx.exit();
|
||||
if (!ensureTriggerWorkflowsConfigured(ctx, params.group)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -369,11 +374,7 @@ RecordTriggerWorkflowActionModel.registerFlow({
|
||||
ctx.exit();
|
||||
return;
|
||||
}
|
||||
if (!params.group?.length) {
|
||||
ctx.message.error(
|
||||
ctx.t('Button is not configured properly, please contact the administrator.', { ns: NAMESPACE }),
|
||||
);
|
||||
ctx.exit();
|
||||
if (!ensureTriggerWorkflowsConfigured(ctx, params.group)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -472,11 +473,7 @@ CollectionTriggerWorkflowActionModel.registerFlow({
|
||||
const step = ctx.model.stepParams.customCollectionTriggerWorkflowsActionSettings;
|
||||
const { type } = step.setContextType;
|
||||
const { group, contextData } = step.triggerWorkflows ?? {};
|
||||
if (!group?.length) {
|
||||
ctx.message.error(
|
||||
ctx.t('Button is not configured properly, please contact the administrator.', { ns: NAMESPACE }),
|
||||
);
|
||||
ctx.exit();
|
||||
if (!ensureTriggerWorkflowsConfigured(ctx, group)) {
|
||||
return;
|
||||
}
|
||||
if (type === CONTEXT_TYPE.MULTIPLE_RECORDS) {
|
||||
@@ -562,6 +559,10 @@ function globalTriggerWorkflowUiSchema() {
|
||||
}
|
||||
|
||||
async function globalTriggerWorkflowHandler(ctx, params) {
|
||||
if (!ensureTriggerWorkflowsConfigured(ctx, params.group)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let values;
|
||||
if (params.contextData) {
|
||||
try {
|
||||
@@ -579,9 +580,9 @@ async function globalTriggerWorkflowHandler(ctx, params) {
|
||||
},
|
||||
data: { values },
|
||||
});
|
||||
ctx.message.success(ctx.t('Operation succeeded'));
|
||||
} catch (error) {
|
||||
console.error('Error triggering workflows:', error);
|
||||
ctx.exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+108
-1
@@ -14,7 +14,7 @@ import {
|
||||
RecordActionGroupModel,
|
||||
} from '@nocobase/client-v2';
|
||||
import { FlowEngine } from '@nocobase/flow-engine';
|
||||
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import {
|
||||
CollectionTriggerWorkflowActionModel,
|
||||
FormTriggerWorkflowActionModel,
|
||||
@@ -91,6 +91,14 @@ async function getTriggerWorkflowItemNames(ModelClass: any, ctx: any) {
|
||||
return items.map((item) => item.useModel).filter((name) => triggerWorkflowActionModelNames.has(name));
|
||||
}
|
||||
|
||||
function getWorkbenchTriggerWorkflowHandler(model: WorkbenchTriggerWorkflowActionModel) {
|
||||
const step = model.getFlow('workbenchTriggerWorkflowsActionSettings')?.getStep('triggerWorkflows')?.serialize() as
|
||||
| { handler?: (ctx: any, params: { group?: unknown[] }) => Promise<void> }
|
||||
| undefined;
|
||||
expect(step?.handler).toBeTypeOf('function');
|
||||
return step.handler;
|
||||
}
|
||||
|
||||
describe('trigger workflow action model registration', () => {
|
||||
beforeEach(() => {
|
||||
actionGroupModelSnapshots = actionGroupModelClasses.map((ModelClass) => [
|
||||
@@ -132,3 +140,102 @@ describe('trigger workflow action model registration', () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('WorkbenchTriggerWorkflowActionModel', () => {
|
||||
it('does not send trigger request when no workflow is bound', async () => {
|
||||
const flowEngine = createEngine();
|
||||
const model = flowEngine.createModel<WorkbenchTriggerWorkflowActionModel>({
|
||||
use: 'WorkbenchTriggerWorkflowActionModel',
|
||||
uid: 'workbench-trigger-workflow-action',
|
||||
});
|
||||
const request = vi.fn();
|
||||
const ctx = {
|
||||
api: {
|
||||
request,
|
||||
},
|
||||
message: {
|
||||
error: vi.fn(),
|
||||
success: vi.fn(),
|
||||
},
|
||||
t: (value: string) => value,
|
||||
exit: vi.fn(),
|
||||
};
|
||||
|
||||
const handler = getWorkbenchTriggerWorkflowHandler(model);
|
||||
|
||||
await handler(ctx, {});
|
||||
|
||||
expect(request).not.toHaveBeenCalled();
|
||||
expect(ctx.message.error).toHaveBeenCalledWith(
|
||||
'Button is not configured properly, please contact the administrator.',
|
||||
);
|
||||
expect(ctx.message.success).not.toHaveBeenCalled();
|
||||
expect(ctx.exit).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('sends trigger request without showing duplicate success message when workflow is bound', async () => {
|
||||
const flowEngine = createEngine();
|
||||
const model = flowEngine.createModel<WorkbenchTriggerWorkflowActionModel>({
|
||||
use: 'WorkbenchTriggerWorkflowActionModel',
|
||||
uid: 'workbench-trigger-workflow-action-bound',
|
||||
});
|
||||
const request = vi.fn().mockResolvedValue({});
|
||||
const ctx = {
|
||||
api: {
|
||||
request,
|
||||
},
|
||||
message: {
|
||||
error: vi.fn(),
|
||||
success: vi.fn(),
|
||||
},
|
||||
t: (value: string) => value,
|
||||
exit: vi.fn(),
|
||||
};
|
||||
|
||||
const handler = getWorkbenchTriggerWorkflowHandler(model);
|
||||
|
||||
await handler(ctx, { group: [{ workflowKey: 'workflow-1' }] });
|
||||
|
||||
expect(request).toHaveBeenCalledWith({
|
||||
url: 'workflows:trigger',
|
||||
method: 'post',
|
||||
params: {
|
||||
triggerWorkflows: 'workflow-1',
|
||||
},
|
||||
data: { values: undefined },
|
||||
});
|
||||
expect(ctx.message.error).not.toHaveBeenCalled();
|
||||
expect(ctx.message.success).not.toHaveBeenCalled();
|
||||
expect(ctx.exit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('exits flow when trigger request fails', async () => {
|
||||
const flowEngine = createEngine();
|
||||
const model = flowEngine.createModel<WorkbenchTriggerWorkflowActionModel>({
|
||||
use: 'WorkbenchTriggerWorkflowActionModel',
|
||||
uid: 'workbench-trigger-workflow-action-failed',
|
||||
});
|
||||
const request = vi.fn().mockRejectedValue(new Error('trigger failed'));
|
||||
const ctx = {
|
||||
api: {
|
||||
request,
|
||||
},
|
||||
message: {
|
||||
error: vi.fn(),
|
||||
success: vi.fn(),
|
||||
},
|
||||
t: (value: string) => value,
|
||||
exit: vi.fn(),
|
||||
};
|
||||
const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {});
|
||||
|
||||
const handler = getWorkbenchTriggerWorkflowHandler(model);
|
||||
|
||||
await handler(ctx, { group: [{ workflowKey: 'workflow-1' }] });
|
||||
|
||||
expect(request).toHaveBeenCalled();
|
||||
expect(ctx.message.success).not.toHaveBeenCalled();
|
||||
expect(ctx.exit).toHaveBeenCalled();
|
||||
consoleError.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user