You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodeFirst column upgrades on tables that already have data (#31). SysUser.ForceTotp/TotpEnabled and SysSession.AbsoluteExpiresAt are now nullable database columns — SQL Server rejects ADDing a NOT NULL column without a DEFAULT to a non-empty table, so upgrading a live kernel install used to fail on this dialect. Existing rows read back as NULL; the read path treats that as the pre-upgrade default (MFA flags false, absolute expiry falling back to ExpiresAt) without changing the CLR type of the already-published public properties. Covered by a new regression test, CodeFirstNullableUpgradeTests (drops the columns from a seeded table, then asserts CodeFirst re-adds them and old rows still read correctly), now also run in the SqlServer dialect-sensitive CI subset.
Documented the underlying rule for anyone adding columns to an already-shipped entity: docs/coding-standards.md §1.3, a new "已有表加列" section in skills/create-entity.md, and a tip box in the deployment guide explaining why evolved columns must be nullable.