Admin Log Browser Improvements (#39130)

This commit is contained in:
Southbridge
2025-11-23 15:22:30 -06:00
committed by Vanessa
parent 1a6285fe3a
commit a779990dfc
27 changed files with 4621 additions and 68 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
/// <inheritdoc />
public partial class AdminLogsCurtime : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<long>(
name: "cur_time",
table: "admin_log",
type: "bigint",
nullable: false,
defaultValue: 0L);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "cur_time",
table: "admin_log");
}
}
}
@@ -1,5 +1,6 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using System.Net;
using System.Text.Json;
using Content.Server.Database;
@@ -101,6 +102,10 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("integer")
.HasColumnName("admin_log_id");
b.Property<long>("CurTime")
.HasColumnType("bigint")
.HasColumnName("cur_time");
b.Property<DateTime>("Date")
.HasColumnType("timestamp with time zone")
.HasColumnName("date");
@@ -868,7 +873,7 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("text")
.HasColumnName("admin_ooc_color");
b.PrimitiveCollection<string[]>("ConstructionFavorites")
b.PrimitiveCollection<List<string>>("ConstructionFavorites")
.IsRequired()
.HasColumnType("text[]")
.HasColumnName("construction_favorites");
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Sqlite
{
/// <inheritdoc />
public partial class AdminLogsCurtime : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<long>(
name: "cur_time",
table: "admin_log",
type: "INTEGER",
nullable: false,
defaultValue: 0L);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "cur_time",
table: "admin_log");
}
}
}
@@ -91,6 +91,10 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasColumnType("INTEGER")
.HasColumnName("admin_log_id");
b.Property<long>("CurTime")
.HasColumnType("INTEGER")
.HasColumnName("cur_time");
b.Property<DateTime>("Date")
.HasColumnType("TEXT")
.HasColumnName("date");
+5
View File
@@ -721,6 +721,11 @@ namespace Content.Server.Database
[Required] public DateTime Date { get; set; }
/// <summary>
/// The current time in the round in ticks since the start of the round.
/// </summary>
public long CurTime { get; set; }
[Required] public string Message { get; set; } = default!;
[Required, Column(TypeName = "jsonb")] public JsonDocument Json { get; set; } = default!;