Commit 5898293
committed
fix(database): V3 migration — convert UUID columns from BINARY(16) to native uuid type
Hibernate ORM 7 maps java.util.UUID to MariaDB's native uuid type, but the
V1 baseline created elytra_players.playerId and game_results.player_id as
BINARY(16). This caused two runtime errors:
- hbm2ddl=update tried to ALTER the columns but MariaDB refused due to FK
- INSERT failed with 'Data too long' because Hibernate sends UUID as a
36-char string, not 16-byte binary
V3 drops fk_game_results_player, converts both columns to uuid NOT NULL,
and re-adds the FK. Safe on fresh installs too (no-op if already uuid).1 parent 5af240b commit 5898293
1 file changed
Lines changed: 20 additions & 0 deletions
File tree
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments