Log server ID in connection logs table (#21911)

This commit is contained in:
Pieter-Jan Briers
2023-12-06 23:48:56 +01:00
committed by GitHub
parent e639006d42
commit b4f8393f42
16 changed files with 3690 additions and 11 deletions

View File

@@ -498,6 +498,12 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasColumnType("BLOB")
.HasColumnName("hwid");
b.Property<int>("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0)
.HasColumnName("server_id");
b.Property<DateTime>("Time")
.HasColumnType("TEXT")
.HasColumnName("time");
@@ -514,6 +520,9 @@ namespace Content.Server.Database.Migrations.Sqlite
b.HasKey("Id")
.HasName("PK_connection_log");
b.HasIndex("ServerId")
.HasDatabaseName("IX_connection_log_server_id");
b.HasIndex("UserId");
b.ToTable("connection_log", (string)null);
@@ -1398,6 +1407,18 @@ namespace Content.Server.Database.Migrations.Sqlite
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.ConnectionLog", b =>
{
b.HasOne("Content.Server.Database.Server", "Server")
.WithMany("ConnectionLogs")
.HasForeignKey("ServerId")
.OnDelete(DeleteBehavior.SetNull)
.IsRequired()
.HasConstraintName("FK_connection_log_server_server_id");
b.Navigation("Server");
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
@@ -1644,6 +1665,8 @@ namespace Content.Server.Database.Migrations.Sqlite
modelBuilder.Entity("Content.Server.Database.Server", b =>
{
b.Navigation("ConnectionLogs");
b.Navigation("Rounds");
});