bootstrap ircs-prod gitops config

This commit is contained in:
Prodiglagla
2026-06-14 11:46:13 +08:00
commit f83d1157b1
41 changed files with 3879 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# ircs-system to ircs-prod compatible data migration
Goal: migrate old `ircs-system` business data into V3 `ircs-prod` while allowing incompatible runtime tables to be discarded.
Required order:
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:
- 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.