- README 默认英文:README.en.md → README.md(英文为默认),中文移至 README.zh-CN.md,语言切换链接同步 - 恢复被删除的 docs/en/ 英文文档(git 历史 cc5e53c5^),删除 4 篇已废弃文件 - 英文导航 config.ts 对齐中文结构(新增 Deployment/Changelog 侧栏,同步 Guide/Design 条目) - 翻译 15 篇中文新增文档:guide 5 篇(certificates/pages-usage/proxy-config/uptime-kuma/zone-domain-migration)+ design 10 篇(zone-design/cloudflare-pointing/waf-orchestration/origin-error-page/edge-cache-design/pages-design/logstore/kuma-design/login-captcha/observability 三篇) - en 首页更新(新增 Pages 特性、tagline 同步);changelog 英文入口指向中文版 - vitepress 构建验证:43 个英文页面全部渲染 注意:29 篇旧英文文档为恢复版,部分内容(如 deployment/server、reference/configuration)可能落后于中文,需后续逐篇同步
2.9 KiB
Zone Domain Migration and Release Acceptance
When migrating from the legacy managed_domains / inline domain columns of reverse proxy routes to the Zone + Zone Domain model, data import and table structure upgrades are both completed by the automatic goose migration at Server startup — no separate import command is needed.
What Happens During Upgrade
When starting (or rolling-upgrading) a Server version that includes the Zone rework, no manual command is required; migrator.Migrate() automatically:
- Applies goose SQL: creates
of_zones/of_zone_domains(if they do not yet exist). - Automatically imports the legacy route domain columns (and
of_managed_domainswhen routes have no domains) as Zone / Zone Domains, bindingproxy_route_id/cert_id(registering root domains via public suffix list parsing). - Continues goose SQL: drops the redundant domain/certificate columns from
of_managed_domainsandof_proxy_routes.
The import is idempotent: existing domains are skipped or have their route binding back-filled.
If historical data cannot be parsed (conflicting domains, invalid root domains, missing certificates, etc.), startup fails. Fix the data or restore a backup and start again to retry.
Recommended Actions
1. Back Up Before Upgrading
# PostgreSQL example
pg_dump "$DATABASE_URL" > openflare-pre-zone-$(date +%Y%m%d).sql
# Or copy the backup volume / snapshot; for SQLite, copy the database file in the data directory
Optional: note down the current active config version number and checksum in the admin panel for config rollback comparison.
2. Upgrade and Start the Server
Deploy the new version and start it. Watch the goose success messages in the startup log; if "Zone migration failed (N conflicts)" appears, fix the source data according to the conflicts listed in the log and restart.
3. Post-Upgrade Checks
- Admin panel Websites
/websites: check whether Zone root domains and domain counts are reasonable. - Zone details: domains, certificates, associated route IDs.
- Reverse proxy routes: domain bindings come from Zone Domains, not legacy hand-written fields.
4. Config Preview and Release
- Review the config diff / preview in the admin panel.
- Verify per route:
server_nameset, certificate paths, WAF Route ID, Pages references. - Allow the redundant
domain/domains/cert_idson routes in old snapshot JSON to disappear. - Do not allow data-plane semantic changes.
- After the preview passes, release it; if needed, activate the pre-upgrade version in config versions for config rollback. For database rollback, use the pre-upgrade backup (down migrations do not backfill business domain data).