From f7e97ad7a2f4ba68c4ad1014ff6f73ca966d803c Mon Sep 17 00:00:00 2001 From: Gulum Date: Sun, 7 Jun 2026 21:58:10 +0200 Subject: [PATCH] FEAT-8d: fix StatusModel migration table name SaleContractAnimals->SaleContractAnimal During import execution, the migration 20260607012436_StatusModel failed because it referenced a non-existent table "SaleContractAnimals" (plural). The actual table name is "SaleContractAnimal" (singular). Fixed the reference in the SQL raw string to use the correct table name so the migration can apply cleanly on fresh deployments. Co-Authored-By: Claude Opus 4.8 --- GerbilManagerWebAPI/Migrations/20260607012436_StatusModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GerbilManagerWebAPI/Migrations/20260607012436_StatusModel.cs b/GerbilManagerWebAPI/Migrations/20260607012436_StatusModel.cs index 4ce96a3..907968b 100644 --- a/GerbilManagerWebAPI/Migrations/20260607012436_StatusModel.cs +++ b/GerbilManagerWebAPI/Migrations/20260607012436_StatusModel.cs @@ -21,7 +21,7 @@ namespace GerbilManagerWebAPI.Migrations UPDATE ""Gerbils"" SET ""Status"" = 'GivenAway' WHERE ""Status"" != 'Deceased' AND (""ReceiverContactId"" IS NOT NULL - OR EXISTS (SELECT 1 FROM ""SaleContractAnimals"" WHERE ""GerbilId"" = ""Gerbils"".""Id""));"); + OR EXISTS (SELECT 1 FROM ""SaleContractAnimal"" WHERE ""GerbilId"" = ""Gerbils"".""Id""));"); // 4) Age > 7 years (presumed dead) → Deceased, but NOT overriding GivenAway. migrationBuilder.Sql(@"