Fix admin log indices. (#7920)

This commit is contained in:
Pieter-Jan Briers
2022-05-04 16:18:55 +02:00
committed by GitHub
parent faec39da2b
commit fc119befca
8 changed files with 2521 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
public partial class FixIndices : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_admin_log_message",
table: "admin_log");
migrationBuilder.CreateIndex(
name: "IX_admin_log_date",
table: "admin_log",
column: "date");
migrationBuilder.CreateIndex(
name: "IX_admin_log_message",
table: "admin_log",
column: "message")
.Annotation("Npgsql:IndexMethod", "GIN")
.Annotation("Npgsql:TsVectorConfig", "english");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_admin_log_date",
table: "admin_log");
migrationBuilder.DropIndex(
name: "IX_admin_log_message",
table: "admin_log");
migrationBuilder.CreateIndex(
name: "IX_admin_log_message",
table: "admin_log",
column: "message")
.Annotation("Npgsql:TsVectorConfig", "english");
}
}
}