aboutsummaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-09-12 17:42:16 +0500
committerAbyss777 <abyss@fox5.ru>2017-09-12 17:42:16 +0500
commit925806fe70e10e47bcc12eb8bcc4fe21a9ece220 (patch)
treea2972e4915f941699c6582b915c27189f28c63e4 /schema
parent195e7b5b45c08fa4fad4f9c8797f8807ded1dbea (diff)
downloadtraccar-server-925806fe70e10e47bcc12eb8bcc4fe21a9ece220.tar.gz
traccar-server-925806fe70e10e47bcc12eb8bcc4fe21a9ece220.tar.bz2
traccar-server-925806fe70e10e47bcc12eb8bcc4fe21a9ece220.zip
Implement Saved Commands
Diffstat (limited to 'schema')
-rw-r--r--schema/changelog-3.15.xml64
1 files changed, 63 insertions, 1 deletions
diff --git a/schema/changelog-3.15.xml b/schema/changelog-3.15.xml
index 37fd2e278..f6ed306dc 100644
--- a/schema/changelog-3.15.xml
+++ b/schema/changelog-3.15.xml
@@ -7,7 +7,7 @@
logicalFilePath="changelog-3.15">
<changeSet author="author" id="changelog-3.15">
-
+
<dropForeignKeyConstraint baseTableName="attribute_aliases" constraintName="fk_attribute_aliases_deviceid" />
<dropUniqueConstraint tableName="attribute_aliases" constraintName="uk_deviceid_attribute" />
@@ -21,5 +21,67 @@
<dropColumn tableName="users" columnName="speedunit" />
<dropColumn tableName="users" columnName="distanceunit" />
+ <createTable tableName="commands">
+ <column name="id" type="INT" autoIncrement="true">
+ <constraints primaryKey="true" />
+ </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>
+
+ <createTable tableName="user_command">
+ <column name="userid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ <column name="commandid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ </createTable>
+
+ <addForeignKeyConstraint baseTableName="user_command" baseColumnNames="userid" constraintName="fk_user_command_userid" referencedTableName="users" referencedColumnNames="id" onDelete="CASCADE" />
+ <addForeignKeyConstraint baseTableName="user_command" baseColumnNames="commandid" constraintName="fk_user_command_commandid" referencedTableName="commands" referencedColumnNames="id" onDelete="CASCADE" />
+
+ <createTable tableName="group_command">
+ <column name="groupid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ <column name="commandid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ </createTable>
+
+ <addForeignKeyConstraint baseTableName="group_command" baseColumnNames="groupid" constraintName="fk_group_command_groupid" referencedTableName="groups" referencedColumnNames="id" onDelete="CASCADE" />
+ <addForeignKeyConstraint baseTableName="group_command" baseColumnNames="commandid" constraintName="fk_group_command_commandid" referencedTableName="commands" referencedColumnNames="id" onDelete="CASCADE" />
+
+ <createTable tableName="device_command">
+ <column name="deviceid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ <column name="commandid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ </createTable>
+
+ <addForeignKeyConstraint baseTableName="device_command" baseColumnNames="deviceid" constraintName="fk_device_command_deviceid" referencedTableName="devices" referencedColumnNames="id" onDelete="CASCADE" />
+ <addForeignKeyConstraint baseTableName="device_command" baseColumnNames="commandid" constraintName="fk_device_command_commandid" referencedTableName="commands" referencedColumnNames="id" onDelete="CASCADE" />
+
+ <addColumn tableName="servers">
+ <column name="limitcommands" type="BOOLEAN" defaultValueBoolean="false" />
+ </addColumn>
+
+ <addColumn tableName="users">
+ <column name="limitcommands" type="BOOLEAN" defaultValueBoolean="false" />
+ </addColumn>
+
</changeSet>
</databaseChangeLog>