• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lucaslorentz / auto-compute / 23083627850

14 Mar 2026 07:47AM UTC coverage: 60.096%. First build
23083627850

Pull #19

github

lucaslorentz
Add automatic backfill SQL generation in migrations for computed properties

When a computed property is added or its expression changes, `dotnet ef migrations add`
now automatically generates `migrationBuilder.Sql("UPDATE ...")` to update existing records.

- SHA256 hash of expanded expression stored as permanent annotation for change detection
- Uses ExecuteUpdate + SqlCaptureInterceptor for provider-agnostic SQL generation
- Configurable via `EnableBackfillInMigrations` (enabled by default)
- Untranslatable expressions generate a friendly SQL comment
- Existing properties without hashes are skipped (assumes consistency)
- Removes code coverage threshold from CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pull Request #19: Automatic backfill SQL generation in migrations

35 of 149 new or added lines in 8 files covered. (23.49%)

2009 of 3343 relevant lines covered (60.1%)

664.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/src/LLL.AutoCompute.EFCore/Metadata/Internal/DesignTimeComputedStore.cs
1
using Microsoft.EntityFrameworkCore.Metadata;
2

3
namespace LLL.AutoCompute.EFCore.Metadata.Internal;
4

5
public static class DesignTimeComputedStore
6
{
7
    /// <summary>
8
    /// Factories collected during model finalization (before temp annotations are removed).
9
    /// Available for use after the model is finalized.
10
    /// </summary>
11
    public static IReadOnlyList<(IProperty Property, ComputedMemberFactory<IProperty> Factory)>? Factories { get; set; }
192✔
12

13
    /// <summary>
14
    /// Computed members created from the factories after model finalization.
15
    /// </summary>
NEW
16
    public static IReadOnlyList<ComputedMember>? ComputedMembers { get; set; }
×
17

NEW
18
    public static IComputedExpressionAnalyzer? ExpressionAnalyzer { get; set; }
×
19
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc