Skip to content

Commit

Permalink
Add ServerName
Browse files Browse the repository at this point in the history
  • Loading branch information
Simyon264 committed Mar 2, 2024
1 parent bc9e18d commit 49b1760
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 0 deletions.
153 changes: 153 additions & 0 deletions Server/Migrations/20240302110641_ServerName.Designer.cs

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

28 changes: 28 additions & 0 deletions Server/Migrations/20240302110641_ServerName.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

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

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ServerName",
table: "Replays");
}
}
}
3 changes: 3 additions & 0 deletions Server/Migrations/ReplayDbContextModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.IsRequired()
.HasColumnType("text");

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

b.Property<int>("Size")
.HasColumnType("integer");

Expand Down
2 changes: 2 additions & 0 deletions Shared/Models/Replay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class Replay
[YamlMember(Alias = "roundId")]
public int? RoundId { get; set; }

[YamlMember(Alias = "server_name")]
public string? ServerName { get; set; }
public DateTime? Date { get; set; }

[YamlMember(Alias = "map")]
Expand Down

0 comments on commit 49b1760

Please sign in to comment.