Kevin GEN-3g fuegt 5 CP-*-Hell-Varianten ein (hell = cchmch): CP-Agouti-Hell, CP-Silberagouti-Hell, CP-Algierfuchs-Hell, CP-Polarfuchs-Hell, CP-Orangeschimmel-Hell. Eintraege 0-53 (PEW..CP-Agouti) unveraendert. Eintraege 54-61 werden durch UpdateData in den bestehenden IDs 55-61 umgeschrieben (EF-Rename- in-Place-Shift): CP-Silberagouti/Algierfuchs/Polarfuchs/Fuchs/Fuchs-Hell/ Blaufuchs/Orangeschimmel ruecken um +1 bis +4 Positionen. 5 echte Neu- Eintraege als InsertData in IDs 62-66. Migration: 7 UpdateData + 5 InsertData, keine DeleteData, kein Datenverlust ausser theoretischer Gerbil.ColorVarietyId-FK-Drift fuer die CP-Varianten (ON DELETE SET NULL + Re-Import re-matcht per Name). Gate: 126/126 C#-Tests, has-pending-model-changes = No. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
157 lines
7.3 KiB
C#
157 lines
7.3 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
namespace GerbilManagerWebAPI.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ReseedColorVarietiesGen3g : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000055"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmch DD EE GG PP spsp rere", "CP-Agouti-Hell" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000056"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm DD EE gg PP spsp rere", "CP-Silberagouti" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000057"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmch DD EE gg PP spsp rere", "CP-Silberagouti-Hell" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000058"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm DD ee GG PP spsp rere", "CP-Algierfuchs" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000059"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmch DD ee GG PP spsp rere", "CP-Algierfuchs-Hell" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000060"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm DD ee gg PP spsp rere", "CP-Polarfuchs" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000061"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmch DD ee gg PP spsp rere", "CP-Polarfuchs-Hell" });
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "ColorVarieties",
|
|
columns: new[] { "Id", "CanonicalGenotype", "Name", "SortOrder" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("00000000-0000-0000-0000-000000000062"), "AA cchmcchm dd ee GG PP spsp rere", "CP-Fuchs", 61 },
|
|
{ new Guid("00000000-0000-0000-0000-000000000063"), "AA cchmch dd ee GG PP spsp rere", "CP-Fuchs-Hell", 62 },
|
|
{ new Guid("00000000-0000-0000-0000-000000000064"), "AA cchmcchm dd ee gg PP spsp rere", "CP-Blaufuchs", 63 },
|
|
{ new Guid("00000000-0000-0000-0000-000000000065"), "AA cchmcchm DD efef GG PP spsp rere", "CP-Orangeschimmel", 64 },
|
|
{ new Guid("00000000-0000-0000-0000-000000000066"), "AA cchmch DD efef GG PP spsp rere", "CP-Orangeschimmel-Hell", 65 }
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000062"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000063"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000064"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000065"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000066"));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000055"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm DD EE gg PP spsp rere", "CP-Silberagouti" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000056"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm DD ee GG PP spsp rere", "CP-Algierfuchs" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000057"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm DD ee gg PP spsp rere", "CP-Polarfuchs" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000058"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm dd ee GG PP spsp rere", "CP-Fuchs" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000059"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmch dd ee GG PP spsp rere", "CP-Fuchs-Hell" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000060"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm dd ee gg PP spsp rere", "CP-Blaufuchs" });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "ColorVarieties",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("00000000-0000-0000-0000-000000000061"),
|
|
columns: new[] { "CanonicalGenotype", "Name" },
|
|
values: new object[] { "AA cchmcchm DD efef GG PP spsp rere", "CP-Orangeschimmel" });
|
|
}
|
|
}
|
|
}
|