diff --git a/westreiche_website/app/migrations.php b/westreiche_website/app/migrations.php index 42fd488..1ab8f58 100644 --- a/westreiche_website/app/migrations.php +++ b/westreiche_website/app/migrations.php @@ -46,9 +46,11 @@ 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: Attributkürzel deutsch (GES/KON/WEI statt DEX/CON/WIS). Der ENUM + // muss erst die neuen Werte zulassen, dann die Daten umschlüsseln, + // danach fallen die alten Werte wieder raus. 5 => [ + "ALTER TABLE skills MODIFY attribute ENUM('STR', 'DEX', 'CON', 'INT', 'WIS', 'CHA', 'GES', 'KON', 'WEI', '') NOT NULL DEFAULT ''", "UPDATE skills SET attribute = 'GES' WHERE attribute = 'DEX'", "UPDATE skills SET attribute = 'KON' WHERE attribute = 'CON'", "UPDATE skills SET attribute = 'WEI' WHERE attribute = 'WIS'",