aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-08 19:28:21 +1200
committerGitHub <noreply@github.com>2018-06-08 19:28:21 +1200
commitae1b5bd74b69a7e8222af39e3c62aa217ba94d29 (patch)
treecc73bcf707a3e663c20d19eca273985f24f28059 /src/org/traccar
parentacf93dbe1b5c03df4f8f82ffb7fb0cace767a416 (diff)
parent7f473f9200c0c6e2f588537da2ce81715b327043 (diff)
downloadtrackermap-server-ae1b5bd74b69a7e8222af39e3c62aa217ba94d29.tar.gz
trackermap-server-ae1b5bd74b69a7e8222af39e3c62aa217ba94d29.tar.bz2
trackermap-server-ae1b5bd74b69a7e8222af39e3c62aa217ba94d29.zip
Merge pull request #3919 from Abyss777/tables_rename
Rename all tables to avoid using reserved words
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/database/DataManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index ae5ec2d5f..06dd26b17 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -273,11 +273,12 @@ public class DataManager {
if (propertyName.equals("ManagedUser")) {
propertyName = "User";
}
- return Introspector.decapitalize(owner.getSimpleName()) + "_" + Introspector.decapitalize(propertyName);
+ return "tc_" + Introspector.decapitalize(owner.getSimpleName())
+ + "_" + Introspector.decapitalize(propertyName);
}
private static String getObjectsTableName(Class<?> clazz) {
- String result = Introspector.decapitalize(clazz.getSimpleName());
+ String result = "tc_" + Introspector.decapitalize(clazz.getSimpleName());
// Add "s" ending if object name is not plural already
if (!result.endsWith("s")) {
result += "s";