Skip to content

Commit

Permalink
Add CQCHookEndpoint to DB model
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Jun 11, 2024
1 parent 9b5a7a8 commit f8f40e0
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PackageRegistryService/Data/DataInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public static void SeedData(ValidationPackageDb context)
ReleaseDate = new(i.LastUpdated.Year, i.LastUpdated.Month, i.LastUpdated.Day),
Tags = i.Metadata.Tags,
ReleaseNotes = i.Metadata.ReleaseNotes,
Authors = i.Metadata.Authors
Authors = i.Metadata.Authors,
CQCHookEndpoint = i.Metadata.CQCHookEndpoint
};
});

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

#nullable disable

namespace PackageRegistryService.Migrations
{
/// <inheritdoc />
public partial class addHookEndpoint : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "CQCHookEndpoint",
table: "ValidationPackages",
type: "text",
nullable: true);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CQCHookEndpoint",
table: "ValidationPackages");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<int>("PatchVersion")
.HasColumnType("integer");

b.Property<string>("CQCHookEndpoint")
.HasColumnType("text");

b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
Expand Down
4 changes: 4 additions & 0 deletions src/PackageRegistryService/Models/ValidationPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public class ValidationPackage
/// <summary>
///
/// </summary>
public string? CQCHookEndpoint { get; set; }
/// <summary>
///
/// </summary>
public ICollection<AVPRIndex.Domain.Author>? Authors { get; set; } // https://www.learnentityframeworkcore.com/relationships#navigation-properties
/// <summary>
///
Expand Down

0 comments on commit f8f40e0

Please sign in to comment.