d56729de42
Captures client IP at job-search link-click time and threads it through to the session. Both Email and ClientIpAddress are copied from session to each result row during processing. Closes #47 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
using CvSearch.Data;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CvSearch.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddEmailIpToSessionAndResults : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ClientIpAddress",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "JobSearchSessions",
|
|
type: "nvarchar(45)",
|
|
maxLength: 45,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ClientIpAddress",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "JobSearchResults",
|
|
type: "nvarchar(45)",
|
|
maxLength: 45,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Email",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "JobSearchResults",
|
|
type: "nvarchar(256)",
|
|
maxLength: 256,
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ClientIpAddress",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "JobSearchSessions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ClientIpAddress",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "JobSearchResults");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Email",
|
|
schema: MigrationConstants.SchemaName,
|
|
table: "JobSearchResults");
|
|
}
|
|
}
|
|
}
|