aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--schema/changelog-5.5.xml15
-rw-r--r--schema/changelog-master.xml1
-rw-r--r--src/main/java/org/traccar/model/BaseCommand.java10
-rw-r--r--src/main/java/org/traccar/model/Command.java10
-rw-r--r--src/main/java/org/traccar/model/QueuedCommand.java5
5 files changed, 29 insertions, 12 deletions
diff --git a/schema/changelog-5.5.xml b/schema/changelog-5.5.xml
new file mode 100644
index 000000000..4f5b210c5
--- /dev/null
+++ b/schema/changelog-5.5.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
+ http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
+ logicalFilePath="changelog-5.5">
+
+ <changeSet author="author" id="changelog-5.5">
+
+ <dropColumn tableName="tc_commands_queue" columnName="description" />
+
+ </changeSet>
+
+</databaseChangeLog>
diff --git a/schema/changelog-master.xml b/schema/changelog-master.xml
index e877c1afd..cc39c5c41 100644
--- a/schema/changelog-master.xml
+++ b/schema/changelog-master.xml
@@ -35,5 +35,6 @@
<include file="changelog-5.2.xml" relativeToChangelogFile="true" />
<include file="changelog-5.3.xml" relativeToChangelogFile="true" />
<include file="changelog-5.4.xml" relativeToChangelogFile="true" />
+ <include file="changelog-5.5.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
diff --git a/src/main/java/org/traccar/model/BaseCommand.java b/src/main/java/org/traccar/model/BaseCommand.java
index 16df9c126..f87b8ef65 100644
--- a/src/main/java/org/traccar/model/BaseCommand.java
+++ b/src/main/java/org/traccar/model/BaseCommand.java
@@ -17,16 +17,6 @@ package org.traccar.model;
public class BaseCommand extends Message {
- private String description;
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
private boolean textChannel;
public boolean getTextChannel() {
diff --git a/src/main/java/org/traccar/model/Command.java b/src/main/java/org/traccar/model/Command.java
index 4ea619e95..99988dd82 100644
--- a/src/main/java/org/traccar/model/Command.java
+++ b/src/main/java/org/traccar/model/Command.java
@@ -96,4 +96,14 @@ public class Command extends BaseCommand {
super.setDeviceId(deviceId);
}
+ private String description;
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
}
diff --git a/src/main/java/org/traccar/model/QueuedCommand.java b/src/main/java/org/traccar/model/QueuedCommand.java
index fff77a22b..96a1eca4b 100644
--- a/src/main/java/org/traccar/model/QueuedCommand.java
+++ b/src/main/java/org/traccar/model/QueuedCommand.java
@@ -15,18 +15,19 @@
*/
package org.traccar.model;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.traccar.storage.StorageName;
import java.util.HashMap;
@StorageName("tc_commands_queue")
+@JsonIgnoreProperties(ignoreUnknown = true)
public class QueuedCommand extends BaseCommand {
public static QueuedCommand fromCommand(Command command) {
QueuedCommand queuedCommand = new QueuedCommand();
queuedCommand.setDeviceId(command.getDeviceId());
queuedCommand.setType(command.getType());
- queuedCommand.setDescription(command.getDescription());
queuedCommand.setTextChannel(command.getTextChannel());
queuedCommand.setAttributes(new HashMap<>(command.getAttributes()));
return queuedCommand;
@@ -36,7 +37,7 @@ public class QueuedCommand extends BaseCommand {
Command command = new Command();
command.setDeviceId(getDeviceId());
command.setType(getType());
- command.setDescription(getDescription());
+ command.setDescription("");
command.setTextChannel(getTextChannel());
command.setAttributes(new HashMap<>(getAttributes()));
return command;