Initial commit: archer, a Go-native MySQL/MariaDB table archiver

Renamed from arcdb: module path, cmd/archer, internal/archererr,
docs, build scripts and ARCHER_* environment variables.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
voidandClaude Sonnet 4.6 committed 2026-11-06 22:12:17 +08:00
commit bc4a6b504f
99 files changed
+12752

No files matched your search

@@ -0,0 +1,17 @@
## 1. 指纹生成
- [x] 1.1 将 `internal/cli/hash.go` 的 `dsnFingerprint` 改为:`nil` 返回空串;否则值拷贝 `mysql.Config`、清空 `Passwd`、返回 `FormatDSN()`
- [x] 1.2 更新 `Fingerprint` 与 `dsnFingerprint` 的注释,说明输出为标准 DSN、覆盖驱动全部已解析参数、密码除外
## 2. 测试
- [x] 2.1 新增单元测试:`charset` 或 `collation` 不同时指纹不同
- [x] 2.2 新增单元测试:仅密码不同时指纹相同
- [x] 2.3 新增单元测试:指纹中不含密码明文,`dest` 为空时片段为空串
- [x] 2.4 新增断言:`state.json` 的 `config.source` 等于 `redactDSN` 输出的标准 DSN(可复用现有 app 测试夹具)
## 3. 验证
- [x] 3.1 运行 `go test ./...`(无数据库环境下跳过集成测试)
- [ ] 3.2 用同一 `--source` 分别以不同密码、不同 `charset` 运行 `--dry-run` 与续跑,确认前者指纹一致、后者报错并展示 `source` 差异
- [ ] 3.3 用旧版 `state.json` 续跑一次,确认报错信息可读,且 `--force-resume` 后正常继续并改写为新格式