Skip to content

Commit

Permalink
fixes after review.
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelPawelec-RDX committed Jan 13, 2025
1 parent 6d0ea94 commit 2e5a3b3
Show file tree
Hide file tree
Showing 6 changed files with 3,257 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -651,14 +651,17 @@ private static void HookupHistory(ModelBuilder modelBuilder)
.Entity<UnverifiedStandardMetadataEntryHistory>()
.HasIndex(e => new { e.EntityId, e.Discriminator, e.FromStateVersion });

// Used by Data aggregator when inserting new data.
modelBuilder
.Entity<ResourceHolder>()
.HasIndex(e => new { e.EntityId, e.ResourceEntityId })
.IsUnique();

// Used by Gateway API when querying resource holders endpoint.
modelBuilder
.Entity<ResourceHolder>()
.HasIndex(e => new { e.ResourceEntityId, e.Balance, e.Id });
.HasIndex(e => new { e.ResourceEntityId, e.Balance, e.EntityId })
.IsDescending(false, true, true);

modelBuilder
.Entity<EntityResourceTotalsHistory>()
Expand Down
Loading

0 comments on commit 2e5a3b3

Please sign in to comment.