SEED-HELL: Backend-ColorVariety-Seed 61->66 (GEN-3g CP-*-Hell)
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>
This commit is contained in:
@@ -231,6 +231,10 @@ public class ApplicationContext : DbContext
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private static void SeedColorVarieties(ModelBuilder modelBuilder)
|
private static void SeedColorVarieties(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
// GEN-3g (Kevin): 5 CP-*-Hell variants added (interleaved with base CP varieties).
|
||||||
|
// Entries 0-53 (PEW..CP-Agouti) are unchanged. Entries 54+ shift by +1 or +2 where
|
||||||
|
// the new -Hell variants are inserted; IDs follow the i+1 formula. ON DELETE SET NULL
|
||||||
|
// on Gerbil.ColorVarietyId means the FK drift is safe; re-import re-links by name.
|
||||||
(string Name, string Genotype)[] catalog =
|
(string Name, string Genotype)[] catalog =
|
||||||
{
|
{
|
||||||
("Pink Eyed White (PEW)", "AA chch DD EE GG pp spsp rere"),
|
("Pink Eyed White (PEW)", "AA chch DD EE GG pp spsp rere"),
|
||||||
@@ -286,14 +290,19 @@ public class ApplicationContext : DbContext
|
|||||||
("Marder", "aa cchmcchm DD EE GG PP spsp rere"),
|
("Marder", "aa cchmcchm DD EE GG PP spsp rere"),
|
||||||
("Siam", "aa cchmch DD EE GG PP spsp rere"),
|
("Siam", "aa cchmch DD EE GG PP spsp rere"),
|
||||||
("Zobel-Hell", "aa cchmch DD EE gg PP spsp rere"),
|
("Zobel-Hell", "aa cchmch DD EE gg PP spsp rere"),
|
||||||
("CP-Agouti", "AA cchmcchm DD EE GG PP spsp rere"),
|
("CP-Agouti", "AA cchmcchm DD EE GG PP spsp rere"),
|
||||||
("CP-Silberagouti", "AA cchmcchm DD EE gg PP spsp rere"),
|
("CP-Agouti-Hell", "AA cchmch DD EE GG PP spsp rere"), // GEN-3g
|
||||||
("CP-Algierfuchs", "AA cchmcchm DD ee GG PP spsp rere"),
|
("CP-Silberagouti", "AA cchmcchm DD EE gg PP spsp rere"),
|
||||||
("CP-Polarfuchs", "AA cchmcchm DD ee gg PP spsp rere"),
|
("CP-Silberagouti-Hell","AA cchmch DD EE gg PP spsp rere"), // GEN-3g
|
||||||
("CP-Fuchs", "AA cchmcchm dd ee GG PP spsp rere"),
|
("CP-Algierfuchs", "AA cchmcchm DD ee GG PP spsp rere"),
|
||||||
("CP-Fuchs-Hell", "AA cchmch dd ee GG PP spsp rere"),
|
("CP-Algierfuchs-Hell", "AA cchmch DD ee GG PP spsp rere"), // GEN-3g
|
||||||
("CP-Blaufuchs", "AA cchmcchm dd ee gg PP spsp rere"),
|
("CP-Polarfuchs", "AA cchmcchm DD ee gg PP spsp rere"),
|
||||||
("CP-Orangeschimmel", "AA cchmcchm DD efef GG PP spsp rere"),
|
("CP-Polarfuchs-Hell", "AA cchmch DD ee gg PP spsp rere"), // GEN-3g
|
||||||
|
("CP-Fuchs", "AA cchmcchm dd ee GG PP spsp rere"),
|
||||||
|
("CP-Fuchs-Hell", "AA cchmch dd ee GG PP spsp rere"),
|
||||||
|
("CP-Blaufuchs", "AA cchmcchm dd ee gg PP spsp rere"),
|
||||||
|
("CP-Orangeschimmel", "AA cchmcchm DD efef GG PP spsp rere"),
|
||||||
|
("CP-Orangeschimmel-Hell","AA cchmch DD efef GG PP spsp rere"), // GEN-3g
|
||||||
};
|
};
|
||||||
|
|
||||||
var rows = new ColorVariety[catalog.Length];
|
var rows = new ColorVariety[catalog.Length];
|
||||||
|
|||||||
1337
GerbilManagerWebAPI/Migrations/20260606133459_ReseedColorVarietiesGen3g.Designer.cs
generated
Normal file
1337
GerbilManagerWebAPI/Migrations/20260606133459_ReseedColorVarietiesGen3g.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,156 @@
|
|||||||
|
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" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -560,51 +560,86 @@ namespace GerbilManagerWebAPI.Migrations
|
|||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("00000000-0000-0000-0000-000000000055"),
|
Id = new Guid("00000000-0000-0000-0000-000000000055"),
|
||||||
CanonicalGenotype = "AA cchmcchm DD EE gg PP spsp rere",
|
CanonicalGenotype = "AA cchmch DD EE GG PP spsp rere",
|
||||||
Name = "CP-Silberagouti",
|
Name = "CP-Agouti-Hell",
|
||||||
SortOrder = 54
|
SortOrder = 54
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("00000000-0000-0000-0000-000000000056"),
|
Id = new Guid("00000000-0000-0000-0000-000000000056"),
|
||||||
CanonicalGenotype = "AA cchmcchm DD ee GG PP spsp rere",
|
CanonicalGenotype = "AA cchmcchm DD EE gg PP spsp rere",
|
||||||
Name = "CP-Algierfuchs",
|
Name = "CP-Silberagouti",
|
||||||
SortOrder = 55
|
SortOrder = 55
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("00000000-0000-0000-0000-000000000057"),
|
Id = new Guid("00000000-0000-0000-0000-000000000057"),
|
||||||
CanonicalGenotype = "AA cchmcchm DD ee gg PP spsp rere",
|
CanonicalGenotype = "AA cchmch DD EE gg PP spsp rere",
|
||||||
Name = "CP-Polarfuchs",
|
Name = "CP-Silberagouti-Hell",
|
||||||
SortOrder = 56
|
SortOrder = 56
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("00000000-0000-0000-0000-000000000058"),
|
Id = new Guid("00000000-0000-0000-0000-000000000058"),
|
||||||
CanonicalGenotype = "AA cchmcchm dd ee GG PP spsp rere",
|
CanonicalGenotype = "AA cchmcchm DD ee GG PP spsp rere",
|
||||||
Name = "CP-Fuchs",
|
Name = "CP-Algierfuchs",
|
||||||
SortOrder = 57
|
SortOrder = 57
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("00000000-0000-0000-0000-000000000059"),
|
Id = new Guid("00000000-0000-0000-0000-000000000059"),
|
||||||
CanonicalGenotype = "AA cchmch dd ee GG PP spsp rere",
|
CanonicalGenotype = "AA cchmch DD ee GG PP spsp rere",
|
||||||
Name = "CP-Fuchs-Hell",
|
Name = "CP-Algierfuchs-Hell",
|
||||||
SortOrder = 58
|
SortOrder = 58
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("00000000-0000-0000-0000-000000000060"),
|
Id = new Guid("00000000-0000-0000-0000-000000000060"),
|
||||||
CanonicalGenotype = "AA cchmcchm dd ee gg PP spsp rere",
|
CanonicalGenotype = "AA cchmcchm DD ee gg PP spsp rere",
|
||||||
Name = "CP-Blaufuchs",
|
Name = "CP-Polarfuchs",
|
||||||
SortOrder = 59
|
SortOrder = 59
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("00000000-0000-0000-0000-000000000061"),
|
Id = new Guid("00000000-0000-0000-0000-000000000061"),
|
||||||
|
CanonicalGenotype = "AA cchmch DD ee gg PP spsp rere",
|
||||||
|
Name = "CP-Polarfuchs-Hell",
|
||||||
|
SortOrder = 60
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = new Guid("00000000-0000-0000-0000-000000000062"),
|
||||||
|
CanonicalGenotype = "AA cchmcchm dd ee GG PP spsp rere",
|
||||||
|
Name = "CP-Fuchs",
|
||||||
|
SortOrder = 61
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = new Guid("00000000-0000-0000-0000-000000000063"),
|
||||||
|
CanonicalGenotype = "AA cchmch dd ee GG PP spsp rere",
|
||||||
|
Name = "CP-Fuchs-Hell",
|
||||||
|
SortOrder = 62
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = new Guid("00000000-0000-0000-0000-000000000064"),
|
||||||
|
CanonicalGenotype = "AA cchmcchm dd ee gg PP spsp rere",
|
||||||
|
Name = "CP-Blaufuchs",
|
||||||
|
SortOrder = 63
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = new Guid("00000000-0000-0000-0000-000000000065"),
|
||||||
CanonicalGenotype = "AA cchmcchm DD efef GG PP spsp rere",
|
CanonicalGenotype = "AA cchmcchm DD efef GG PP spsp rere",
|
||||||
Name = "CP-Orangeschimmel",
|
Name = "CP-Orangeschimmel",
|
||||||
SortOrder = 60
|
SortOrder = 64
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = new Guid("00000000-0000-0000-0000-000000000066"),
|
||||||
|
CanonicalGenotype = "AA cchmch DD efef GG PP spsp rere",
|
||||||
|
Name = "CP-Orangeschimmel-Hell",
|
||||||
|
SortOrder = 65
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user