Skip to content
Open
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

Large diffs are not rendered by default.

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

#nullable disable

namespace ServiceControl.Persistence.EFCore.PostgreSql.Migrations
{
/// <inheritdoc />
public partial class AddSubscriptions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "subscriptions",
columns: table => new
{
message_type = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
transport_address = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
endpoint = table.Column<string>(type: "character varying(450)", maxLength: 450, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_subscriptions", x => new { x.message_type, x.transport_address });
});
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "subscriptions");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,30 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("known_endpoints", (string)null);
});

modelBuilder.Entity("ServiceControl.Persistence.EFCore.Entities.SubscriptionEntity", b =>
{
b.Property<string>("MessageType")
.HasMaxLength(200)
.HasColumnType("character varying(200)")
.HasColumnName("message_type");

b.Property<string>("TransportAddress")
.HasMaxLength(200)
.HasColumnType("character varying(200)")
.HasColumnName("transport_address");

b.Property<string>("Endpoint")
.IsRequired()
.HasMaxLength(450)
.HasColumnType("character varying(450)")
.HasColumnName("endpoint");

b.HasKey("MessageType", "TransportAddress")
.HasName("pk_subscriptions");

b.ToTable("subscriptions", (string)null);
});

modelBuilder.Entity("ServiceControl.Persistence.EFCore.Entities.TrialMetadataEntity", b =>
{
b.Property<int>("Id")
Expand Down

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

Loading
Loading