Litter.DeathsWithin8Weeks (int?, nullable). LitterDto + LitterInput extended. Validation: negative → 400, > TotalBorn → 400 (skipped when TotalBorn null). Migration AddLitterMortality (additive, nullable). 5 new tests. 194/194 green. Contract: camelCase field deathsWithin8Weeks in LitterDto/LitterInput.
29 lines
781 B
C#
29 lines
781 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace GerbilManagerWebAPI.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddLitterMortality : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "DeathsWithin8Weeks",
|
|
table: "Litters",
|
|
type: "integer",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "DeathsWithin8Weeks",
|
|
table: "Litters");
|
|
}
|
|
}
|
|
}
|