From a3397f8ad38230cda5963bc90cdc44e714856c8d Mon Sep 17 00:00:00 2001 From: wsbrenk Date: Mon, 2 Oct 2023 18:04:50 +0200 Subject: [PATCH] #1816 fix length of owner notes in players' database table (#1926) --- src/main/java/core/db/DBUpdater.java | 1 + src/main/java/core/db/SpielerTable.java | 2 +- src/main/resources/release_notes.md | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/core/db/DBUpdater.java b/src/main/java/core/db/DBUpdater.java index 132a65ee5..107948963 100644 --- a/src/main/java/core/db/DBUpdater.java +++ b/src/main/java/core/db/DBUpdater.java @@ -85,6 +85,7 @@ void updateDB(int DBVersion) { private void updateDBv800(int dbVersion) throws SQLException { var playerTable = dbManager.getTable(SpielerTable.TABLENAME); playerTable.tryAddColumn("LineupDisabled", "BOOLEAN"); + playerTable.tryChangeColumn("OwnerNotes", "VARCHAR(512)"); updateDBVersion(dbVersion, 800); } diff --git a/src/main/java/core/db/SpielerTable.java b/src/main/java/core/db/SpielerTable.java index 7b0f5baec..0136c7e11 100644 --- a/src/main/java/core/db/SpielerTable.java +++ b/src/main/java/core/db/SpielerTable.java @@ -86,7 +86,7 @@ protected void initColumns() { ColumnDescriptor.Builder.newInstance().setColumnName("GoalsCurrentTeam").setGetter((p)->((Player)p).getGoalsCurrentTeam()).setSetter((p,v)->((Player)p).setGoalsCurrentTeam((Integer) v)).setType(Types.INTEGER).isNullable(true).build(), ColumnDescriptor.Builder.newInstance().setColumnName("PlayerCategory").setGetter((p)->(PlayerCategory.idOf(((Player)p).getPlayerCategory()))).setSetter((p,v)->((Player)p).setPlayerCategory(PlayerCategory.valueOf((Integer) v))).setType(Types.INTEGER).isNullable(true).build(), ColumnDescriptor.Builder.newInstance().setColumnName("Statement").setGetter((p)->((Player)p).getPlayerStatement()).setSetter((p,v)->((Player)p).setPlayerStatement((String)v)).setType(Types.VARCHAR).isNullable(true).setLength(255).build(), - ColumnDescriptor.Builder.newInstance().setColumnName("OwnerNotes").setGetter((p)->((Player)p).getOwnerNotes()).setSetter((p,v)->((Player)p).setOwnerNotes((String)v)).setType(Types.VARCHAR).isNullable(true).setLength(255).build(), + ColumnDescriptor.Builder.newInstance().setColumnName("OwnerNotes").setGetter((p)->((Player)p).getOwnerNotes()).setSetter((p,v)->((Player)p).setOwnerNotes((String)v)).setType(Types.VARCHAR).isNullable(true).setLength(512).build(), ColumnDescriptor.Builder.newInstance().setColumnName("LastMatch_PlayedMinutes").setGetter((p)->((Player)p).getLastMatchMinutes()).setSetter((p,v)->((Player)p).setLastMatchMinutes((Integer) v)).setType(Types.INTEGER).isNullable(true).build(), ColumnDescriptor.Builder.newInstance().setColumnName("LastMatch_PositionCode").setGetter((p)->((Player)p).getLastMatchPosition()).setSetter((p,v)->((Player)p).setLastMatchPosition((Integer) v)).setType(Types.INTEGER).isNullable(true).build(), ColumnDescriptor.Builder.newInstance().setColumnName("LastMatch_RatingEndOfGame").setGetter((p)->((Player)p).getLastMatchRatingEndOfGame()).setSetter((p,v)->((Player)p).setLastMatchRatingEndOfGame((Integer) v)).setType(Types.INTEGER).isNullable(true).build(), diff --git a/src/main/resources/release_notes.md b/src/main/resources/release_notes.md index c337922ff..6f5ae70ac 100644 --- a/src/main/resources/release_notes.md +++ b/src/main/resources/release_notes.md @@ -9,6 +9,7 @@ ### Database ### Squad +* fix length of owner notes in players' database table (#1816) ### Team Analyzer @@ -34,7 +35,9 @@ ## Translations -Reports by Contributors - September 24, 2023 - September 24, 2023 +Reports by Contributors - September 24, 2023 - October 02, 2023 +* Lidegand 3 +* wsbrenk 3 -Total 0 +Total 6