chore: restore independent prod gitops config
This commit is contained in:
@@ -1,20 +1,15 @@
|
||||
# ircs-system to ircs-prod compatible data migration
|
||||
# ircs-prod data migration runbook
|
||||
|
||||
Goal: migrate old `ircs-system` business data into V3 `ircs-prod` while allowing incompatible runtime tables to be discarded.
|
||||
状态:历史记录
|
||||
|
||||
Required order:
|
||||
当前 `ircs-prod` 按新环境干净初始化,不迁移旧 `ircs-system` 业务数据。`ircs-prod-migrator` 仍保留在 `ircs-prod/migration/`,但由 Argo CD 手动同步,避免迁移 Job 自动反复执行。
|
||||
|
||||
1. Back up old `ircs-system` PostgreSQL.
|
||||
2. Prepare `ircs-prod` secrets with `scripts/prepare-prod-secrets.ps1`.
|
||||
3. Sync `ircs-prod-core` and wait for PostgreSQL, RabbitMQ, Valkey, Elasticsearch, services, and migrator.
|
||||
4. Run `scripts/migrate-compatible-data.ps1` once without `-Execute` to compare table presence.
|
||||
5. Run `scripts/migrate-compatible-data.ps1 -Execute -TruncateTarget` only when `ircs-prod` has no valuable data.
|
||||
6. Rebuild search/index derived state through V3 ops runners after migration.
|
||||
如果未来确实需要导入旧数据,先新增一份独立迁移方案并明确:
|
||||
|
||||
Migration policy:
|
||||
- 源库和目标库。
|
||||
- 需要复制的业务表。
|
||||
- 必须跳过的 runtime、audit、outbox、lock、Liquibase 表。
|
||||
- 回滚方式。
|
||||
- 迁移前后只读校验 SQL。
|
||||
|
||||
- Copy compatible V1 business tables only.
|
||||
- Do not copy `databasechangelog` or `databasechangeloglock`.
|
||||
- Do not copy V3 derived audit/outbox/maintenance tables.
|
||||
- If a table or column becomes incompatible, prefer explicit table-level skip plus a written note over silent lossy conversion.
|
||||
- Existing R2 bucket remains `ircs` so historical media URLs stay valid.
|
||||
不要直接复用旧 `ircs-system` 兼容迁移脚本作为生产操作入口。
|
||||
|
||||
Reference in New Issue
Block a user