dc3051f447
Deleted all incremental migrations and regenerated fresh InitialSchema migrations that contain the complete, correct schema from the start: - CvMatcher: InitialSchema with 3-column unique constraint on Results (CvDocumentId, JobDocumentId, Language) - Email: InitialSchema with Templates table (consolidated from EmailTemplates) This creates a cleaner migration history and faster fresh deployments. Since there is no production data, consolidation is safe and improves maintainability. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
44 lines
1.6 KiB
C#
44 lines
1.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Email.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class InitialSchema : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.EnsureSchema(
|
|
name: "email");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "Templates",
|
|
schema: "email",
|
|
columns: table => new
|
|
{
|
|
Key = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
|
Language = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false),
|
|
Value = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false, defaultValue: ""),
|
|
UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, defaultValueSql: "SYSUTCDATETIME()"),
|
|
OperatorCopy = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false, defaultValue: "")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Templates", x => new { x.Key, x.Language });
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Templates",
|
|
schema: "email");
|
|
}
|
|
}
|
|
}
|