a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/database] Remove redundant index on the marker table

This index is identical to the composite primary key, and therefore redundant.

+31 -4
-3
Iceshrimp.Backend/Core/Database/Migrations/DatabaseContextModelSnapshot.cs
··· 1638 1638 1639 1639 b.HasIndex("UserId"); 1640 1640 1641 - b.HasIndex("UserId", "Type") 1642 - .IsUnique(); 1643 - 1644 1641 b.ToTable("marker"); 1645 1642 }); 1646 1643
+31
Iceshrimp.Backend/Core/Database/Migrations/v2024.1-beta1/20240419181840_RemoveRedundantMarkerIndex.cs
··· 1 + using Microsoft.EntityFrameworkCore.Migrations; 2 + using Microsoft.EntityFrameworkCore.Infrastructure; 3 + 4 + #nullable disable 5 + 6 + namespace Iceshrimp.Backend.Core.Database.Migrations 7 + { 8 + /// <inheritdoc /> 9 + [DbContext(typeof(DatabaseContext))] 10 + [Migration("20240419181840_RemoveRedundantMarkerIndex")] 11 + public partial class RemoveRedundantMarkerIndex : Migration 12 + { 13 + /// <inheritdoc /> 14 + protected override void Up(MigrationBuilder migrationBuilder) 15 + { 16 + migrationBuilder.DropIndex( 17 + name: "IX_marker_userId_type", 18 + table: "marker"); 19 + } 20 + 21 + /// <inheritdoc /> 22 + protected override void Down(MigrationBuilder migrationBuilder) 23 + { 24 + migrationBuilder.CreateIndex( 25 + name: "IX_marker_userId_type", 26 + table: "marker", 27 + columns: new[] { "userId", "type" }, 28 + unique: true); 29 + } 30 + } 31 + }
-1
Iceshrimp.Backend/Core/Database/Tables/Marker.cs
··· 7 7 8 8 [Table("marker")] 9 9 [Index(nameof(UserId))] 10 - [Index(nameof(UserId), nameof(Type), IsUnique = true)] 11 10 [PrimaryKey(nameof(UserId), nameof(Type))] 12 11 public class Marker 13 12 {