Skip to content

Commit 7dd5c8a

Browse files
committed
Remove RoundEndText indexing
Caused indexing issues when the text was too long lmao, this made the server try to redownload the errored file. This caused me to use 2TB of download in 1.5 days. Yipee!
1 parent 04d6ada commit 7dd5c8a

File tree

4 files changed

+197
-4
lines changed

4 files changed

+197
-4
lines changed

Server/Api/ReplayDbContext.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
2222
.HasIndex(r => r.Gamemode);
2323
modelBuilder.Entity<Replay>()
2424
.HasIndex(r => r.ServerId);
25-
modelBuilder.Entity<Replay>()
26-
.HasIndex(r => r.RoundEndText);
25+
modelBuilder.Entity<Replay>();
2726
modelBuilder.Entity<Replay>()
2827
.HasIndex(r => r.ServerName);
2928
modelBuilder.Entity<Player>()

Server/Migrations/20240402222948_RemoveRoundEndTextIndex.Designer.cs

Lines changed: 169 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Microsoft.EntityFrameworkCore.Migrations;
2+
3+
#nullable disable
4+
5+
namespace Server.Migrations
6+
{
7+
/// <inheritdoc />
8+
public partial class RemoveRoundEndTextIndex : Migration
9+
{
10+
/// <inheritdoc />
11+
protected override void Up(MigrationBuilder migrationBuilder)
12+
{
13+
migrationBuilder.DropIndex(
14+
name: "IX_Replays_RoundEndText",
15+
table: "Replays");
16+
}
17+
18+
/// <inheritdoc />
19+
protected override void Down(MigrationBuilder migrationBuilder)
20+
{
21+
migrationBuilder.CreateIndex(
22+
name: "IX_Replays_RoundEndText",
23+
table: "Replays",
24+
column: "RoundEndText");
25+
}
26+
}
27+
}

Server/Migrations/ReplayDbContextModelSnapshot.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
140140

141141
b.HasIndex("Map");
142142

143-
b.HasIndex("RoundEndText");
144-
145143
b.HasIndex("ServerId");
146144

147145
b.HasIndex("ServerName");

0 commit comments

Comments
 (0)