Server names and admin log full-text search (#6327)

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Julian Giebel
2022-03-13 18:36:48 +01:00
committed by GitHub
parent bd3fc84488
commit 414d226ec5
13 changed files with 2424 additions and 8 deletions

View File

@@ -120,6 +120,9 @@ namespace Content.Server.Database.Migrations.Postgres
b.HasKey("Id", "RoundId")
.HasName("PK_admin_log");
b.HasIndex("Message")
.HasAnnotation("Npgsql:TsVectorConfig", "english");
b.HasIndex("RoundId")
.HasDatabaseName("IX_admin_log_round_id");
@@ -559,12 +562,39 @@ namespace Content.Server.Database.Migrations.Postgres
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ServerId")
.HasColumnType("integer")
.HasColumnName("server_id");
b.HasKey("Id")
.HasName("PK_round");
b.HasIndex("ServerId")
.HasDatabaseName("IX_round_server_id");
b.ToTable("round", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Server", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("server_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text")
.HasColumnName("name");
b.HasKey("Id")
.HasName("PK_server");
b.ToTable("server", (string)null);
});
modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
{
b.Property<int>("Id")
@@ -908,6 +938,18 @@ namespace Content.Server.Database.Migrations.Postgres
b.Navigation("Preference");
});
modelBuilder.Entity("Content.Server.Database.Round", b =>
{
b.HasOne("Content.Server.Database.Server", "Server")
.WithMany("Rounds")
.HasForeignKey("ServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_round_server_server_id");
b.Navigation("Server");
});
modelBuilder.Entity("Content.Server.Database.ServerBanHit", b =>
{
b.HasOne("Content.Server.Database.ServerBan", "Ban")
@@ -1016,6 +1058,11 @@ namespace Content.Server.Database.Migrations.Postgres
b.Navigation("AdminLogs");
});
modelBuilder.Entity("Content.Server.Database.Server", b =>
{
b.Navigation("Rounds");
});
modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
{
b.Navigation("BanHits");