From 37868cf0b5be5b99e48b28d1aafacdc74c2aff9e Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 8 Jun 2018 10:00:28 +0500 Subject: Rename all tables to avoid using reserved words --- src/org/traccar/database/DataManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/org/traccar') 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"; -- cgit v1.2.3