Add indicies for user.IsAdmin and .IsModerator
This commit is contained in:
parent
251228eabf
commit
65ece17c40
4 changed files with 5951 additions and 0 deletions
5909
Iceshrimp.Backend/Core/Database/Migrations/20240118165641_AddUserRoleIndicies.Designer.cs
generated
Normal file
5909
Iceshrimp.Backend/Core/Database/Migrations/20240118165641_AddUserRoleIndicies.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,36 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddUserRoleIndicies : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_user_isAdmin",
|
||||
table: "user",
|
||||
column: "isAdmin");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_user_isModerator",
|
||||
table: "user",
|
||||
column: "isModerator");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_user_isAdmin",
|
||||
table: "user");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_user_isModerator",
|
||||
table: "user");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3981,8 +3981,12 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
|
|||
|
||||
b.HasIndex("Host");
|
||||
|
||||
b.HasIndex("IsAdmin");
|
||||
|
||||
b.HasIndex("IsExplorable");
|
||||
|
||||
b.HasIndex("IsModerator");
|
||||
|
||||
b.HasIndex("LastActiveDate");
|
||||
|
||||
b.HasIndex("Tags");
|
||||
|
|
|
@ -12,6 +12,8 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
|||
[Index("Uri")]
|
||||
[Index("LastActiveDate")]
|
||||
[Index("IsExplorable")]
|
||||
[Index("IsAdmin")]
|
||||
[Index("IsModerator")]
|
||||
[Index("CreatedAt")]
|
||||
[Index("Tags")]
|
||||
[Index("AvatarId", IsUnique = true)]
|
||||
|
|
Loading…
Add table
Reference in a new issue