fix(db): repair fresh migration chain
CI and Deploy / test (pull_request) Successful in 5m19s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-15 20:47:36 +02:00
parent 191de69c48
commit 74a1e0d845
15 changed files with 297 additions and 35 deletions
@@ -11,6 +11,7 @@ namespace JobTrackerApi.Migrations
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
var mysql = ActiveProvider.Contains("MySql", StringComparison.OrdinalIgnoreCase);
migrationBuilder.CreateTable(
name: "Companies",
columns: table => new
@@ -39,7 +40,20 @@ namespace JobTrackerApi.Migrations
ResponseDate = table.Column<DateTime>(type: "TEXT", nullable: true),
Notes = table.Column<string>(type: "TEXT", nullable: true),
CoverLetterText = table.Column<string>(type: "TEXT", nullable: true),
JobUrl = table.Column<string>(type: "TEXT", nullable: true)
JobUrl = table.Column<string>(type: "TEXT", nullable: true),
// These stable columns predated EF ownership and were historically supplied by
// startup reconciliation. Include them for new databases so the later SQLite
// DateApplied rebuild has a complete source shape under standalone EF tooling.
OwnerUserId = table.Column<string>(type: mysql ? "varchar(255)" : "TEXT", nullable: true),
ShortSummary = table.Column<string>(type: mysql ? "longtext" : "TEXT", nullable: true),
TailoredCvText = table.Column<string>(type: mysql ? "longtext" : "TEXT", nullable: true),
TailoredCvUpdatedAt = table.Column<DateTime>(type: mysql ? "datetime(6)" : "TEXT", nullable: true),
LastReminderEmailSentAt = table.Column<DateTime>(type: mysql ? "datetime(6)" : "TEXT", nullable: true),
RecruiterMessageDraft = table.Column<string>(type: mysql ? "longtext" : "TEXT", nullable: true),
SalaryMin = table.Column<decimal>(type: mysql ? "decimal(18,2)" : "TEXT", nullable: true),
SalaryMax = table.Column<decimal>(type: mysql ? "decimal(18,2)" : "TEXT", nullable: true),
SalaryCurrency = table.Column<string>(type: mysql ? "varchar(8)" : "TEXT", nullable: true),
SalaryPeriod = table.Column<string>(type: mysql ? "varchar(16)" : "TEXT", nullable: true)
},
constraints: table =>
{