using Microsoft.EntityFrameworkCore.Migrations; using Pgvector; #nullable disable namespace NexusReader.Data.Migrations { /// public partial class AddThemePreference : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Vector", table: "SemanticKnowledgeCache"); migrationBuilder.DropColumn( name: "Vector", table: "KnowledgeUnits"); migrationBuilder.AlterDatabase() .OldAnnotation("Npgsql:PostgresExtension:vector", ",,"); migrationBuilder.AddColumn( name: "ThemePreference", table: "AspNetUsers", type: "integer", nullable: false, defaultValue: 0); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "ThemePreference", table: "AspNetUsers"); migrationBuilder.AlterDatabase() .Annotation("Npgsql:PostgresExtension:vector", ",,"); migrationBuilder.AddColumn( name: "Vector", table: "SemanticKnowledgeCache", type: "vector(1536)", nullable: true); migrationBuilder.AddColumn( name: "Vector", table: "KnowledgeUnits", type: "vector(768)", nullable: true); } } }