Files
tiku-backend.net/docs/migration/phase-2-engineering-foundation.md

28 lines
959 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 第二阶段:.NET 工程底座
状态:已完成。
## 目标
- 建立 ASP.NET Core / EF Core / PostgreSQL 工程底座。
- 固定数据库迁移边界API 不自动改库,迁移由 `Tiku.DbMigrator` 执行。
- 使用真实 PostgreSQL 验证 schema、事务、JSONB、约束和扩展。
## 结果
- Development 未配置连接串时默认连接本机 `tiku` 数据库并使用当前系统用户。
- EF Core 使用 Npgsql 与 PostgreSQL 扩展。
- Secret payload 进入加密字段;不提交本地连接串和密钥。
- 真实 PostgreSQL 集成测试成为数据库能力验收入口。
## 验收
```bash
dotnet build TIKU-BACKEND.slnx --no-restore
dotnet test Tiku.UnitTests/Tiku.UnitTests.csproj --no-restore
dotnet test Tiku.IntegrationTests/Tiku.IntegrationTests.csproj --no-restore
dotnet ef migrations script --project Tiku.Infrastructure --startup-project Tiku.DbMigrator
dotnet run --project Tiku.DbMigrator
git diff --check
```