[CLAUDE] Docs: S151 closeout — bootstrap + trio-AUTO đầu tiên + gói 3-máy vá sống + bookend DEEP trả nợ JUMP (tally #53=53, AS-17 promote)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m38s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-25 20:13:25 +07:00
parent 398d343403
commit 1b85713bb6
54 changed files with 2422 additions and 95 deletions

View File

@ -86,6 +86,7 @@ when-to-use:
| **64** | **`AddSupplierPublishState`** | **🎯 S113 Supplier +`IsPublic` bit NOT NULL default 0 (cổng công-bố "thiếu NCC nháp/ẩn" R4): AddColumn + `Sql("UPDATE Suppliers SET IsPublic=1")` backfill 37/37 prodpublic + DropIndexCreateIndex đổi Code filtered-unique `WHERE [IsDeleted]=0 AND [Code]<>''` (cho phép nhiều nháp Code=''). **No new table (89 giữ)**. Reversible Down (⚠ edge: rollback sau khi 2 nháp Code='' sẽ kẹt CreateIndex filter ). Prod-verified Run #497; commit `5fa11b5`. Kèm gotcha #80 (null-Code NRE NewSupplier).** |
| **65** | **`BackfillPeQuoteIsSelectedAndWinnerInvariant`** | **🎯 S114 DATA-ONLY no-schema (multi-NCC per hạng mục anh Kiệt): backfill **2-CHIỀU** thiết lập bất-biến `Supplier.IsWinner == Any(Quote.IsSelected)`. CHIỀU-1 `IsWinner→IsSelected` (phiếu whole-supplier winner Mig58 set IsSelected mọi quote NCC, **preserve tổng** winnerQuoteTotal) + CHIỀU-2 `IsSelected→IsWinner` (dormant/seed EXISTS). Idempotent (`WHERE ...=0`), SQL-Server-only (SQLite EnsureCreated bỏ qua migration), Down **no-op** (data backfill không reversible, mirror Mig 61). **No new table (89 giữ)** snapshot UNCHANGED (0 CreateColumn). Prod-verified bundle rotate ×2 `D51OYyGV`/`BVdssm5S`; commit `d436af2`. Kèm **gotcha #81** (delete-writer sót re-derive IsWinner phantom giaTri=0 verify-bắt).** |
| **66** | **`AddPeApprovedPriceRange`** | **🎯 S117 PE +`ApprovedPriceMaxAmount decimal(18,2)?` (feature "duyệt theo khoảng MinMax" anh Kiệt FDC "chọn cả 2 min max"): source `"ProMinMax"` = Amount(Min)+MaxAmount(Max), bất-biến `MaxAmount != null ⟺ Source=="ProMinMax"` + MinMax (guard service `ApplyApprovedPriceOnFinalize` + FluentValidation). 1 AddColumn nullable, **no backfill** (phiếu Source-đơn Max=null nguyên vẹn), **no new table (89 giữ)**, reversible Down (DropColumn). .GiaTri KHÔNG đọc giá chốt (=SUM báo giá NCC được chọn) 0 tác động (range = record-of-decision hiển thị). Prod-verified Run #387 (`ApprovedPriceMaxAmount` col decimal(18,2) + `__EFMigrationsHistory` top); commit `316a82f`.** |
| **67** | **`AddPeApprovedBudgetSnapshot`** | **🎯 S133 PE freeze ngân sách phiếu DaDuyet (UAT anh Kiệt: cập nhật NS gói thầu làm phiếu ĐÃ DUYỆT đổi số theo): snapshot **11 cột** AddColumn, chốt tại finalize choke-point + site-5 admin-override + backfill `Sql()` OUTER APPLY 18/18 phiếu prod; **no new table (89 giữ)**; display-gate `budgetFrozen` phiếu DaDuyet đọc snapshot 🔒 badge, phiếu chưa duyệt đọc live "bản cập nhật gần nhất"; reviewer bắt **#81-EXT indirect-assignment** (2 site gán Phase thẳng bypass choke-point FIXED + test site-5); test 509520 (+11 `PeBudgetFreezeTests`). Prod-verified Run #398 (mig top `20260717032812` + backfill 18/18); commit `d4fbced`.** *(row bổ sung @S151 — ring1 TRƯỢT-1 bắt bảng dừng ở 66 trong khi canonical Mig 67)* |
Total: **89 bảng** `sys.tables` (= 88 dbo-app + `__EFMigrationsHistory`; re-ground S97 cicd Run #482 LIVE số canonical `docs/STATUS.md`; last schema-changing Mig 50 net 9388-app, Mig 51-66 đều AddColumn/index/data-only/schema-expand không đổi số bảng). Xem `docs/database/schema-diagram.md` migration table + §11-15 module ERD 16+ Mig 27-66 chi tiết pending).