[CLAUDE] Docs: S45 session-end — test-gap + Mig 43 sync
STATUS/HANDOFF S45 (154->181 test, Mig 43) + gotcha #57 (soft-delete UNIQUE must filter [IsDeleted]=0) + session log + root CLAUDE counts + ef-core skill Mig 43 row + flush 3 agent MEMORY (test-specialist proxy after #53 truncation + cicd Run #368 + investigator P11-C recon). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: ef-core-migration
|
||||
description: Tạo/sửa/revert EF Core 10 migration cho SOLUTION_ERP. Dùng khi thêm entity mới, thay đổi schema, rollback migration, debug DesignTimeDbContextFactory fail. Đã có 42 migration sẵn (Init → AddLeaveBalances Mig 42, S43 Phase 11 P11-B). Snapshot + Designer + Migration 3-file rule bắt buộc commit đủ.
|
||||
description: Tạo/sửa/revert EF Core 10 migration cho SOLUTION_ERP. Dùng khi thêm entity mới, thay đổi schema, rollback migration, debug DesignTimeDbContextFactory fail. Đã có 43 migration sẵn (Init → FilterHolidayUniqueIndexByIsDeleted Mig 43, S45). Snapshot + Designer + Migration 3-file rule bắt buộc commit đủ.
|
||||
when-to-use:
|
||||
- "thêm migration"
|
||||
- "EF Core migration"
|
||||
@ -16,7 +16,7 @@ when-to-use:
|
||||
|
||||
> **Context:** .NET 10 + EF Core 10 + SQL Server. DbContext: `ApplicationDbContext` ở `Infrastructure/Persistence/`. Startup: `SolutionErp.Api`.
|
||||
|
||||
## Migration history (42 migration hiện có)
|
||||
## Migration history (43 migration hiện có)
|
||||
|
||||
| # | Name | Tables added / changed |
|
||||
|---|---|---|
|
||||
@ -62,8 +62,9 @@ when-to-use:
|
||||
| **40** | **`AddAttendances`** | **Chấm công (Attendance) tables + Dashboard NS skeleton. Session 38.** |
|
||||
| **41** | **`WireWorkflowAppsApprovalV2`** | **🎯 Phase 11 P11-A (S42) — +4 `{Leave,Ot,Travel,Vehicle}LevelOpinions` (UNIQUE composite + Cascade/Restrict) + `WorkflowAppCodeSequences` (atomic MaDonTu) + 4 ALTER `RejectedFromStatus` + enum `TravelRequest=9`.** |
|
||||
| **42** | **`AddLeaveBalances`** | **🎯 Phase 11 P11-B (S43) — 1 bảng `LeaveBalances` (User×LeaveType×Year + Entitled/Used/Adjustment, UNIQUE composite + FK LeaveTypes Restrict). Trừ phép tự động khi đơn nghỉ duyệt cuối.** |
|
||||
| **43** | **`FilterHolidayUniqueIndexByIsDeleted`** | **🎯 S45 — DropIndex + CreateIndex `IX_Holidays_Year_Date` UNIQUE filtered `WHERE [IsDeleted]=0` (was unfiltered). Fix reachable 500 khi recreate ngày lễ trên slot soft-deleted. Không bảng mới (table vẫn 91). gotcha #57 — soft-delete UNIQUE phải filter.** |
|
||||
|
||||
Total: **91 bảng** dbo + `__EFMigrationsHistory` (last Mig 42 AddLeaveBalances). Xem `docs/database/schema-diagram.md` migration table + §11-15 module ERD (§16+ Mig 27-42 chi tiết pending).
|
||||
Total: **91 bảng** dbo + `__EFMigrationsHistory` (last Mig 43 FilterHolidayUniqueIndexByIsDeleted, index-only). Xem `docs/database/schema-diagram.md` migration table + §11-15 module ERD (§16+ Mig 27-42 chi tiết pending).
|
||||
|
||||
## N-stage workflow pattern (Mig 18-20 — Session 12-13)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user