Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase maximum size of external event sync item's error code to 100 #840

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class EventResultValidator : AbstractValidator<FinalizeExternalEventSyncS
public EventResultValidator()
{
RuleFor(i => i.ExternalEventId).ValidId<FinalizeExternalEventSyncSyncRunCommand.ExternalEventResult, ExternalEventId>();
RuleFor(i => i.ErrorCode).MaximumLength(50);
RuleFor(i => i.ErrorCode).MaximumLength(100);
tnotheis marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

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

#nullable disable

namespace Backbone.Modules.Synchronization.Infrastructure.Database.Postgres.Migrations
{
/// <inheritdoc />
public partial class IncreaseMaxSizeOfSyncErrorErrorCodeTo100 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ErrorCode",
schema: "Synchronization",
table: "SyncErrors",
type: "character varying(100)",
maxLength: 100,
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ErrorCode",
schema: "Synchronization",
table: "SyncErrors",
type: "character varying(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(100)",
oldMaxLength: 100);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.Property<string>("ErrorCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
.HasMaxLength(100)
.HasColumnType("character varying(100)");

b.Property<string>("ExternalEventId")
.IsRequired()
Expand Down
Loading