Skip to content

Commit

Permalink
#1816 fix length of owner notes in players' database table (#1926)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsbrenk authored Oct 2, 2023
1 parent 260328b commit a3397f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/java/core/db/DBUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/core/db/SpielerTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
7 changes: 5 additions & 2 deletions src/main/resources/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Database

### Squad
* fix length of owner notes in players' database table (#1816)

### Team Analyzer

Expand All @@ -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

0 comments on commit a3397f8

Please sign in to comment.