aboutsummaryrefslogtreecommitdiff
path: root/schema/changelog-3.12.xml
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-05-29 12:01:41 +0500
committerAbyss777 <abyss@fox5.ru>2017-05-29 12:01:41 +0500
commita39e02bc41b832ddb01bd04f2236249d77181cd6 (patch)
tree49fb99d90f26eff19e5a20edb0124d5de32f689a /schema/changelog-3.12.xml
parent8e85055a38ed46d6f4d29f5e96adc8af4252bc7b (diff)
downloadtrackermap-server-a39e02bc41b832ddb01bd04f2236249d77181cd6.tar.gz
trackermap-server-a39e02bc41b832ddb01bd04f2236249d77181cd6.tar.bz2
trackermap-server-a39e02bc41b832ddb01bd04f2236249d77181cd6.zip
Organize foreign key names
Diffstat (limited to 'schema/changelog-3.12.xml')
-rw-r--r--schema/changelog-3.12.xml29
1 files changed, 29 insertions, 0 deletions
diff --git a/schema/changelog-3.12.xml b/schema/changelog-3.12.xml
index 137273b49..8f2296a67 100644
--- a/schema/changelog-3.12.xml
+++ b/schema/changelog-3.12.xml
@@ -77,6 +77,35 @@
<addForeignKeyConstraint baseTableName="device_attribute" baseColumnNames="deviceid" constraintName="fk_device_attribute_deviceid" referencedTableName="devices" referencedColumnNames="id" onDelete="CASCADE" />
<addForeignKeyConstraint baseTableName="device_attribute" baseColumnNames="attributeid" constraintName="fk_device_attribute_attributeid" referencedTableName="attributes" referencedColumnNames="id" onDelete="CASCADE" />
+ <dropForeignKeyConstraint baseTableName="positions" constraintName="fk_position_deviceid"/>
+ <addForeignKeyConstraint baseTableName="positions" baseColumnNames="deviceid" constraintName="fk_positions_deviceid" referencedTableName="devices" referencedColumnNames="id" onDelete="CASCADE" />
+
+ <dropForeignKeyConstraint baseTableName="events" constraintName="fk_event_deviceid"/>
+ <addForeignKeyConstraint baseTableName="events" baseColumnNames="deviceid" constraintName="fk_events_deviceid" referencedTableName="devices" referencedColumnNames="id" onDelete="CASCADE" />
+
+ <dropForeignKeyConstraint baseTableName="device_geofence" constraintName="fk_user_device_geofence_deviceid"/>
+ <addForeignKeyConstraint baseTableName="device_geofence" baseColumnNames="deviceid" constraintName="fk_device_geofence_deviceid" referencedTableName="devices" referencedColumnNames="id" onDelete="CASCADE" />
+ <dropForeignKeyConstraint baseTableName="device_geofence" constraintName="fk_user_device_geofence_geofenceid"/>
+ <addForeignKeyConstraint baseTableName="device_geofence" baseColumnNames="geofenceid" constraintName="fk_device_geofence_geofenceid" referencedTableName="geofences" referencedColumnNames="id" onDelete="CASCADE" />
+
+ <dropForeignKeyConstraint baseTableName="devices" constraintName="fk_device_group_groupid"/>
+ <addForeignKeyConstraint baseTableName="devices" baseColumnNames="groupid" constraintName="fk_devices_groupid" onDelete="SET NULL" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="groups"/>
+
+ <dropForeignKeyConstraint baseTableName="user_calendar" constraintName="fk_user_calendar_geofenceid"/>
+ <addForeignKeyConstraint baseTableName="user_calendar" baseColumnNames="calendarid" constraintName="fk_user_calendar_calendarid" referencedTableName="calendars" referencedColumnNames="id" onDelete="CASCADE" />
+
+ </changeSet>
+
+ <changeSet author="author" id="changelog-3.12-notmssql">
+
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <dbms type="mssql" />
+ </not>
+ </preConditions>
+ <dropForeignKeyConstraint baseTableName="groups" constraintName="fk_group_group_groupid"/>
+ <addForeignKeyConstraint baseTableName="groups" baseColumnNames="groupid" constraintName="fk_groups_groupid" onDelete="SET NULL" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="groups"/>
+
</changeSet>
</databaseChangeLog>