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 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 21:58:10 +02:00
parent 7d552d33cd
commit f7e97ad7a2

View File

@@ -21,7 +21,7 @@ namespace GerbilManagerWebAPI.Migrations
UPDATE ""Gerbils"" SET ""Status"" = 'GivenAway' UPDATE ""Gerbils"" SET ""Status"" = 'GivenAway'
WHERE ""Status"" != 'Deceased' WHERE ""Status"" != 'Deceased'
AND (""ReceiverContactId"" IS NOT NULL 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. // 4) Age > 7 years (presumed dead) → Deceased, but NOT overriding GivenAway.
migrationBuilder.Sql(@" migrationBuilder.Sql(@"