using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace RMuseum.Migrations { /// public partial class AddSemanticSearchQueryLog : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "SemanticSearchQueryLogs", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Query = table.Column(type: "nvarchar(max)", nullable: true), DateTimeUtc = table.Column(type: "datetime2", nullable: false), RequestedTopK = table.Column(type: "int", nullable: false), ResultCount = table.Column(type: "int", nullable: false), TopResultScore = table.Column(type: "real", nullable: true), ScopeDetected = table.Column(type: "bit", nullable: false), DetectedPoetName = table.Column(type: "nvarchar(max)", nullable: true), DetectedCategoryName = table.Column(type: "nvarchar(max)", nullable: true), ScopeDetectionDisabled = table.Column(type: "bit", nullable: false), ClickedPoemId = table.Column(type: "int", nullable: true), ClickedResultRank = table.Column(type: "int", nullable: true), ClickedAtUtc = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_SemanticSearchQueryLogs", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "SemanticSearchQueryLogs"); } } }