aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-01-24 09:59:30 -0800
committerAnton Tananaev <anton@traccar.org>2023-01-24 09:59:30 -0800
commit51c167fa8067ac81a47914211cc252f5dd3e40f1 (patch)
tree563f33a3b9ceadbc8d3b6d9958dc68d7be4c9040
parent8841cea8676057756f23e1f9a710a5a19ac5e63a (diff)
downloadtrackermap-server-51c167fa8067ac81a47914211cc252f5dd3e40f1.tar.gz
trackermap-server-51c167fa8067ac81a47914211cc252f5dd3e40f1.tar.bz2
trackermap-server-51c167fa8067ac81a47914211cc252f5dd3e40f1.zip
Add calendar to report
-rw-r--r--schema/changelog-5.6.xml5
-rw-r--r--src/main/java/org/traccar/model/Report.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/schema/changelog-5.6.xml b/schema/changelog-5.6.xml
index d7768f8e2..38b206902 100644
--- a/schema/changelog-5.6.xml
+++ b/schema/changelog-5.6.xml
@@ -22,6 +22,9 @@
<column name="description" type="VARCHAR(128)">
<constraints nullable="false" />
</column>
+ <column name="calendarid" type="INT">
+ <constraints nullable="false" />
+ </column>
<column name="from" type="TIMESTAMP">
<constraints nullable="false" />
</column>
@@ -33,6 +36,8 @@
</column>
</createTable>
+ <addForeignKeyConstraint baseTableName="tc_reports" baseColumnNames="calendarid" constraintName="fk_reports_calendarid" referencedTableName="tc_calendars" referencedColumnNames="id" onDelete="CASCADE" />
+
<createTable tableName="tc_user_report">
<column name="userid" type="INT">
<constraints nullable="false" />
diff --git a/src/main/java/org/traccar/model/Report.java b/src/main/java/org/traccar/model/Report.java
index 393f6fef7..83bb2e920 100644
--- a/src/main/java/org/traccar/model/Report.java
+++ b/src/main/java/org/traccar/model/Report.java
@@ -20,7 +20,7 @@ import org.traccar.storage.StorageName;
import java.util.Date;
@StorageName("tc_reports")
-public class Report extends ExtendedModel {
+public class Report extends ScheduledModel {
private String type;