aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-08 10:00:28 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-08 10:00:28 +0500
commit37868cf0b5be5b99e48b28d1aafacdc74c2aff9e (patch)
tree4abf328422a470053cea2228ed373e7a60de7cbe /src/org/traccar/database/DataManager.java
parentacf93dbe1b5c03df4f8f82ffb7fb0cace767a416 (diff)
downloadtrackermap-server-37868cf0b5be5b99e48b28d1aafacdc74c2aff9e.tar.gz
trackermap-server-37868cf0b5be5b99e48b28d1aafacdc74c2aff9e.tar.bz2
trackermap-server-37868cf0b5be5b99e48b28d1aafacdc74c2aff9e.zip
Rename all tables to avoid using reserved words
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-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";