aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-28 06:57:11 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-28 06:57:11 -0700
commitf358feda0b0294e403dafd118714ab24b7a8afde (patch)
treeb8e56b93cee39724aee2e153d5029c010702301a
parente7a5d1e1f4d7746e35dfac5b15078de03dc7bf79 (diff)
downloadtrackermap-server-f358feda0b0294e403dafd118714ab24b7a8afde.tar.gz
trackermap-server-f358feda0b0294e403dafd118714ab24b7a8afde.tar.bz2
trackermap-server-f358feda0b0294e403dafd118714ab24b7a8afde.zip
Add table for command queue
-rw-r--r--schema/changelog-5.4.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/schema/changelog-5.4.xml b/schema/changelog-5.4.xml
index f3a13ef59..e69bc5fab 100644
--- a/schema/changelog-5.4.xml
+++ b/schema/changelog-5.4.xml
@@ -17,6 +17,39 @@
<column name="overspeedgeofenceid" type="INT" defaultValueNumeric="0" />
</addColumn>
+ <createTable tableName="tc_commands_queue">
+ <column autoIncrement="true" name="id" type="INT">
+ <constraints primaryKey="true" />
+ </column>
+ <column name="deviceid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ <column name="description" type="VARCHAR(4000)">
+ <constraints nullable="false" />
+ </column>
+ <column name="type" type="VARCHAR(128)">
+ <constraints nullable="false" />
+ </column>
+ <column name="textchannel" type="BOOLEAN" defaultValueBoolean="false">
+ <constraints nullable="false" />
+ </column>
+ <column name="attributes" type="VARCHAR(4000)">
+ <constraints nullable="false" />
+ </column>
+ </createTable>
+
+ <addForeignKeyConstraint
+ baseTableName="tc_commands_queue"
+ baseColumnNames="deviceid"
+ constraintName="fk_commands_queue_deviceid"
+ onDelete="CASCADE"
+ referencedColumnNames="id"
+ referencedTableName="tc_devices" />
+
+ <createIndex tableName="tc_commands_queue" indexName="idx_commands_queue_deviceid">
+ <column name="deviceid" />
+ </createIndex>
+
</changeSet>
</databaseChangeLog>