diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-13 22:15:49 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 22:15:49 +1200 |
commit | 8a45a056b7e0814526904e915c3886b29ba2833a (patch) | |
tree | dc821e2134f4ae2c9881ce8de006a29b33da289f /schema/changelog-3.15.xml | |
parent | e05f0b83a911c522123a5a2cd14d6c16bd2de027 (diff) | |
parent | 7530522cbca477cb822cb494ffe12480e5237934 (diff) | |
download | trackermap-server-8a45a056b7e0814526904e915c3886b29ba2833a.tar.gz trackermap-server-8a45a056b7e0814526904e915c3886b29ba2833a.tar.bz2 trackermap-server-8a45a056b7e0814526904e915c3886b29ba2833a.zip |
Merge pull request #3522 from Abyss777/saved_commands
Implement Saved Commands
Diffstat (limited to 'schema/changelog-3.15.xml')
-rw-r--r-- | schema/changelog-3.15.xml | 64 |
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> |