Attributkuerzel deutsch: GES, KON, WEI (Migration 5 inkl. Daten)

This commit is contained in:
torsten 2026-11-22 12:52:52 +01:00
parent a79e7e7781
commit be55f9c3f5
6 changed files with 62 additions and 35 deletions

View file

@ -46,6 +46,17 @@ const WS_MIGRATIONS = [
4 => [
"ALTER TABLE characters ADD COLUMN IF NOT EXISTS gender VARCHAR(20) NOT NULL DEFAULT 'männlich' AFTER title",
],
// 5: Attributkürzel deutsch (GES/KON/WEI statt DEX/CON/WIS). Erst die
// Daten umschlüsseln, dann den ENUM der Katalogtabelle nachziehen.
5 => [
"UPDATE skills SET attribute = 'GES' WHERE attribute = 'DEX'",
"UPDATE skills SET attribute = 'KON' WHERE attribute = 'CON'",
"UPDATE skills SET attribute = 'WEI' WHERE attribute = 'WIS'",
"UPDATE character_skills SET attribute = 'GES' WHERE attribute = 'DEX'",
"UPDATE character_skills SET attribute = 'KON' WHERE attribute = 'CON'",
"UPDATE character_skills SET attribute = 'WEI' WHERE attribute = 'WIS'",
"ALTER TABLE skills MODIFY attribute ENUM('STR', 'GES', 'KON', 'INT', 'WEI', 'CHA', '') NOT NULL DEFAULT ''",
],
];
function ws_migrations_apply(PDO $pdo): void