Skip to content

Commit

Permalink
fix: use new desiredstate columns for projections
Browse files Browse the repository at this point in the history
  • Loading branch information
CumpsD committed Aug 27, 2019
1 parent 55907b4 commit a7f8854
Show file tree
Hide file tree
Showing 9 changed files with 409 additions and 3 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,36 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace PostalRegistry.Projections.Extract.Migrations
{
public partial class DesiredState : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "DesiredState",
schema: "PostalRegistryExtract",
table: "ProjectionStates",
nullable: true);

migrationBuilder.AddColumn<DateTimeOffset>(
name: "DesiredStateChangedAt",
schema: "PostalRegistryExtract",
table: "ProjectionStates",
nullable: true);
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DesiredState",
schema: "PostalRegistryExtract",
table: "ProjectionStates");

migrationBuilder.DropColumn(
name: "DesiredStateChangedAt",
schema: "PostalRegistryExtract",
table: "ProjectionStates");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.1-servicing-10028")
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

Expand All @@ -24,6 +24,10 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Name")
.ValueGeneratedOnAdd();

b.Property<string>("DesiredState");

b.Property<DateTimeOffset?>("DesiredStateChangedAt");

b.Property<long>("Position");

b.HasKey("Name")
Expand Down

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

namespace PostalRegistry.Projections.Legacy.Migrations
{
public partial class DesiredState : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "DesiredState",
schema: "PostalRegistryLegacy",
table: "ProjectionStates",
nullable: true);

migrationBuilder.AddColumn<DateTimeOffset>(
name: "DesiredStateChangedAt",
schema: "PostalRegistryLegacy",
table: "ProjectionStates",
nullable: true);
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DesiredState",
schema: "PostalRegistryLegacy",
table: "ProjectionStates");

migrationBuilder.DropColumn(
name: "DesiredStateChangedAt",
schema: "PostalRegistryLegacy",
table: "ProjectionStates");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

Expand All @@ -24,6 +24,10 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Name")
.ValueGeneratedOnAdd();

b.Property<string>("DesiredState");

b.Property<DateTimeOffset?>("DesiredStateChangedAt");

b.Property<long>("Position");

b.HasKey("Name")
Expand Down
Loading

0 comments on commit a7f8854

Please sign in to comment.