chore: formalize dotnet backend repository

This commit is contained in:
2026-07-27 12:34:53 +08:00
parent c2e4cd2a12
commit ef4c8fc7e5
7 changed files with 659 additions and 19 deletions

View File

@@ -2,6 +2,11 @@
本文档用于记录从旧 PocketBase / Supabase / NestJS 后端迁移到新 ASP.NET Core + PostgreSQL 后端的阶段性状态和后续优先级。
仓库转正决策和第一阶段基线分别见:
- [`docs/adr/0001-authoritative-dotnet-backend.md`](adr/0001-authoritative-dotnet-backend.md)
- [`docs/migration/phase-1-repository-baseline.md`](migration/phase-1-repository-baseline.md)
迁移原则:
- 不追求旧接口逐字兼容,新前端按新 REST API 对接。
@@ -205,13 +210,14 @@
每批迁移完成后都必须:
```bash
dotnet build /home/xiong/Games/Anii/TIKU-BACKEND/TIKU-BACKEND.slnx
dotnet test /home/xiong/Games/Anii/TIKU-BACKEND/TIKU-BACKEND.slnx
dotnet format /home/xiong/Games/Anii/TIKU-BACKEND/TIKU-BACKEND.slnx --verify-no-changes
git -C /home/xiong/Games/Anii/TIKU-BACKEND diff --check
dotnet restore TIKU-BACKEND.slnx
dotnet build TIKU-BACKEND.slnx --no-restore
dotnet test TIKU-BACKEND.slnx --no-build
dotnet format TIKU-BACKEND.slnx --verify-no-changes --no-restore
git diff --check
dotnet ef migrations script \
--project /home/xiong/Games/Anii/TIKU-BACKEND/Tiku.Infrastructure \
--startup-project /home/xiong/Games/Anii/TIKU-BACKEND/Tiku.DbMigrator
--project Tiku.Infrastructure \
--startup-project Tiku.DbMigrator
```
如果某批不涉及数据库 migration也仍然运行 migration script确认当前模型快照和迁移链没有损坏。