Skip to content

Commit d26ec99

Browse files
authored
Merge pull request #5683 from Particular/john/message_redirects
Store message redirects
2 parents f7a68c0 + 794cfe6 commit d26ec99

12 files changed

Lines changed: 1026 additions & 7 deletions

File tree

src/ServiceControl.Persistence.EFCore.PostgreSql/Migrations/20260802023138_AddMessageRedirects.Designer.cs

Lines changed: 468 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using Microsoft.EntityFrameworkCore.Migrations;
3+
4+
#nullable disable
5+
6+
namespace ServiceControl.Persistence.EFCore.PostgreSql.Migrations
7+
{
8+
/// <inheritdoc />
9+
public partial class AddMessageRedirects : Migration
10+
{
11+
/// <inheritdoc />
12+
protected override void Up(MigrationBuilder migrationBuilder)
13+
{
14+
migrationBuilder.CreateTable(
15+
name: "message_redirects",
16+
columns: table => new
17+
{
18+
from_physical_address = table.Column<string>(type: "character varying(450)", maxLength: 450, nullable: false),
19+
to_physical_address = table.Column<string>(type: "character varying(450)", maxLength: 450, nullable: false),
20+
last_modified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
21+
},
22+
constraints: table =>
23+
{
24+
table.PrimaryKey("pk_message_redirects", x => x.from_physical_address);
25+
});
26+
}
27+
28+
/// <inheritdoc />
29+
protected override void Down(MigrationBuilder migrationBuilder)
30+
{
31+
migrationBuilder.DropTable(
32+
name: "message_redirects");
33+
}
34+
}
35+
}

src/ServiceControl.Persistence.EFCore.PostgreSql/Migrations/PostgreSqlServiceControlDbContextModelSnapshot.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,29 @@ protected override void BuildModel(ModelBuilder modelBuilder)
432432
b.ToTable("known_endpoints", (string)null);
433433
});
434434

435+
modelBuilder.Entity("ServiceControl.Persistence.EFCore.Entities.MessageRedirectEntity", b =>
436+
{
437+
b.Property<string>("FromPhysicalAddress")
438+
.HasMaxLength(450)
439+
.HasColumnType("character varying(450)")
440+
.HasColumnName("from_physical_address");
441+
442+
b.Property<DateTime>("LastModified")
443+
.HasColumnType("timestamp with time zone")
444+
.HasColumnName("last_modified");
445+
446+
b.Property<string>("ToPhysicalAddress")
447+
.IsRequired()
448+
.HasMaxLength(450)
449+
.HasColumnType("character varying(450)")
450+
.HasColumnName("to_physical_address");
451+
452+
b.HasKey("FromPhysicalAddress")
453+
.HasName("pk_message_redirects");
454+
455+
b.ToTable("message_redirects", (string)null);
456+
});
457+
435458
modelBuilder.Entity("ServiceControl.Persistence.EFCore.Entities.SubscriptionEntity", b =>
436459
{
437460
b.Property<string>("MessageType")

0 commit comments

Comments
 (0)