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

lucaslorentz / auto-compute / 23084474323

14 Mar 2026 08:40AM UTC coverage: 59.695%. First build
23084474323

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

21 of 148 new or added lines in 8 files covered. (14.19%)

1995 of 3342 relevant lines covered (59.69%)

663.56 hits per line

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

0.0
/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>
NEW
11
    public static IReadOnlyList<(IProperty Property, ComputedMemberFactory<IProperty> Factory)>? Factories { get; set; }
×
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