Skip to content

Commit

Permalink
perf(integration): add index on parcelid for version
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD authored and jvandaal committed Jul 31, 2024
1 parent 919d3d1 commit 00a221c
Show file tree
Hide file tree
Showing 4 changed files with 313 additions and 1 deletion.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ParcelRegistry.Projections.Integration.Migrations
{
/// <inheritdoc />
public partial class AddVersionParcelIdIndex : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_parcel_version_parcel_id",
schema: "integration_parcel",
table: "parcel_version",
column: "parcel_id");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_parcel_version_parcel_id",
schema: "integration_parcel",
table: "parcel_version");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasIndex("OsloStatus");

b.HasIndex("ParcelId");

b.HasIndex("Status");

b.HasIndex("Type");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void Configure(EntityTypeBuilder<ParcelVersion> builder)
builder.Ignore(parcel => parcel.VersionTimestamp);
builder.Ignore(parcel => parcel.CreatedOnTimestamp);


builder.HasIndex(parcel => parcel.ParcelId);
builder.HasIndex(parcel => parcel.CaPaKey);
builder.HasIndex(parcel => parcel.Status);
builder.HasIndex(parcel => parcel.OsloStatus);
Expand Down

0 comments on commit 00a221c

Please sign in to comment.