Skip to content

Commit

Permalink
fix: add integration parcel latest item address count ef migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jvandaal committed May 17, 2024
1 parent 4e47e5c commit 36b00e7
Show file tree
Hide file tree
Showing 3 changed files with 315 additions and 0 deletions.

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,31 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ParcelRegistry.Projections.Integration.Migrations
{
/// <inheritdoc />
public partial class AddCountOnParcelAddress : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "Count",
schema: "integration_parcel",
table: "parcel_latest_item_addresses",
type: "integer",
nullable: false,
defaultValue: 1);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Count",
schema: "integration_parcel",
table: "parcel_latest_item_addresses");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("text")
.HasColumnName("capakey");

b.Property<int>("Count")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(1);

b.HasKey("ParcelId", "AddressPersistentLocalId");

b.HasIndex("AddressPersistentLocalId");
Expand Down

0 comments on commit 36b00e7

Please sign in to comment.