2d9ffc9c2b
Adds nullable JobSearchSessionId to PageFetchEntity and FetchPageRequest. cv-search-job passes session.Id on every fetch so all Playwright page loads for a job search session can be traced back to their session. Includes index on JobSearchSessionId for efficient lookup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using PageFetcher.Data;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PageFetcher.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddJobSearchSessionId : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "JobSearchSessionId",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "PageFetches",
|
|
type: "nvarchar(64)",
|
|
maxLength: 64,
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PageFetches_JobSearchSessionId",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "PageFetches",
|
|
column: "JobSearchSessionId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PageFetches_JobSearchSessionId",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "PageFetches");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "JobSearchSessionId",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "PageFetches");
|
|
}
|
|
}
|
|
}
|