🗑️ Remove the shit simple search vector
This commit is contained in:
1930
DysonNetwork.Sphere/Migrations/20251025184407_RemovePostSearchVector.Designer.cs
generated
Normal file
1930
DysonNetwork.Sphere/Migrations/20251025184407_RemovePostSearchVector.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using NpgsqlTypes;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DysonNetwork.Sphere.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RemovePostSearchVector : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_posts_search_vector",
|
||||
table: "posts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "search_vector",
|
||||
table: "posts");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<NpgsqlTsVector>(
|
||||
name: "search_vector",
|
||||
table: "posts",
|
||||
type: "tsvector",
|
||||
nullable: false)
|
||||
.Annotation("Npgsql:TsVectorConfig", "simple")
|
||||
.Annotation("Npgsql:TsVectorProperties", new[] { "title", "description", "content" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_posts_search_vector",
|
||||
table: "posts",
|
||||
column: "search_vector")
|
||||
.Annotation("Npgsql:IndexMethod", "GIN");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using NodaTime;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using NpgsqlTypes;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -531,14 +530,6 @@ namespace DysonNetwork.Sphere.Migrations
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("replied_post_id");
|
||||
|
||||
b.Property<NpgsqlTsVector>("SearchVector")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("tsvector")
|
||||
.HasColumnName("search_vector")
|
||||
.HasAnnotation("Npgsql:TsVectorConfig", "simple")
|
||||
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "Title", "Description", "Content" });
|
||||
|
||||
b.Property<List<ContentSensitiveMark>>("SensitiveMarks")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("sensitive_marks");
|
||||
@@ -589,11 +580,6 @@ namespace DysonNetwork.Sphere.Migrations
|
||||
b.HasIndex("RepliedPostId")
|
||||
.HasDatabaseName("ix_posts_replied_post_id");
|
||||
|
||||
b.HasIndex("SearchVector")
|
||||
.HasDatabaseName("ix_posts_search_vector");
|
||||
|
||||
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("SearchVector"), "GIN");
|
||||
|
||||
b.ToTable("posts", (string)null);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user