Skip to content

Commit bdca0a8

Browse files
authored
Merge pull request #895 from lonvia/rename-version-properties
Fix accidental rename of version field in database #890 accidentally renamed the version field in the properties entry from 'databaseVersion' to 'version'. Revert that.
2 parents 45f22cf + c27d247 commit bdca0a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/es_embedded/src/main/java/de/komoot/photon/Server.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public DatabaseProperties loadFromDatabase() {
269269

270270
final var dbProps = new DatabaseProperties();
271271

272-
dbProps.setVersion(properties.get(FIELD_VERSION));
272+
dbProps.setDatabaseVersion(properties.get(FIELD_VERSION));
273273

274274
final String langString = properties.get(FIELD_LANGUAGES);
275275
dbProps.setLanguages(langString == null ? null : langString.split(","));

src/main/java/de/komoot/photon/DatabaseProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ public class DatabaseProperties {
2121
private boolean supportGeometries = false;
2222
private ConfigExtraTags extraTags = new ConfigExtraTags();
2323

24-
public void setVersion(String version) {
24+
public void setDatabaseVersion(String version) {
2525
if (!DATABASE_VERSION.equals(version)) {
2626
LOGGER.error("Database has incompatible version '{}'. Expected: {}",
2727
version, DATABASE_VERSION);
2828
throw new UsageException("Incompatible database.");
2929
}
3030
}
3131

32-
public String getVersion() {
32+
public String getDatabaseVersion() {
3333
return DATABASE_VERSION;
3434
}
3535

0 commit comments

Comments
 (0)