aboutsummaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-26 12:05:16 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-26 12:05:16 +0500
commit825ee0d178a24620f075cb4ffb8d49c75b046484 (patch)
tree2bc60aaea8d4c1eff707ae6e0b8ff558d45d15dc /schema
parentaba402226403f8b3eb58cc01e8f536eb4104d35a (diff)
downloadtraccar-server-825ee0d178a24620f075cb4ffb8d49c75b046484.tar.gz
traccar-server-825ee0d178a24620f075cb4ffb8d49c75b046484.tar.bz2
traccar-server-825ee0d178a24620f075cb4ffb8d49c75b046484.zip
Cleanup and some adjustments
Diffstat (limited to 'schema')
-rw-r--r--schema/changelog-3.18.xml57
-rw-r--r--schema/changelog-4.0.xml47
2 files changed, 47 insertions, 57 deletions
diff --git a/schema/changelog-3.18.xml b/schema/changelog-3.18.xml
deleted file mode 100644
index 85c3b0c33..000000000
--- a/schema/changelog-3.18.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<databaseChangeLog
- xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
- http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
- logicalFilePath="changelog-3.18">
-
- <changeSet author="author" id="changelog-3.18">
-
- <addColumn tableName="notifications">
- <column name="transports" type="VARCHAR(128)" />
- </addColumn>
-
- <update tableName="notifications">
- <column name="transports" value="web, mail, sms" />
- <where>web = 1 AND mail = 1 AND sms = 1</where>
- </update>
-
- <update tableName="notifications">
- <column name="transports" value="web, mail" />
- <where>web = 1 AND mail = 1 AND sms = 0</where>
- </update>
-
- <update tableName="notifications">
- <column name="transports" value="web" />
- <where>web = 1 AND mail = 0 AND sms = 0</where>
- </update>
-
- <update tableName="notifications">
- <column name="transports" value="web, sms" />
- <where>web = 1 AND mail = 0 AND sms = 1</where>
- </update>
-
- <update tableName="notifications">
- <column name="transports" value="mail, sms" />
- <where>web = 0 AND mail = 1 AND sms = 1</where>
- </update>
-
- <update tableName="notifications">
- <column name="transports" value="mail" />
- <where>web = 0 AND mail = 1 AND sms = 0</where>
- </update>
-
- <update tableName="notifications">
- <column name="transports" value="sms" />
- <where>web = 0 AND mail = 0 AND sms = 1</where>
- </update>
-
- <!--
- <dropColumn tableName="notifications" columnName="web" />
- <dropColumn tableName="notifications" columnName="mail" />
- <dropColumn tableName="notifications" columnName="sms" />
- -->
-
- </changeSet>
-</databaseChangeLog>
diff --git a/schema/changelog-4.0.xml b/schema/changelog-4.0.xml
index 04e9fe0c4..82403c83c 100644
--- a/schema/changelog-4.0.xml
+++ b/schema/changelog-4.0.xml
@@ -53,4 +53,51 @@
</changeSet>
+ <changeSet author="author" id="changelog-4.0">
+
+ <addColumn tableName="tc_notifications">
+ <column name="transports" type="VARCHAR(128)" />
+ </addColumn>
+
+ <update tableName="tc_notifications">
+ <column name="transports" value="web,mail,sms" />
+ <where>web = 1 AND mail = 1 AND sms = 1</where>
+ </update>
+
+ <update tableName="tc_notifications">
+ <column name="transports" value="web,mail" />
+ <where>web = 1 AND mail = 1 AND sms = 0</where>
+ </update>
+
+ <update tableName="tc_notifications">
+ <column name="transports" value="web" />
+ <where>web = 1 AND mail = 0 AND sms = 0</where>
+ </update>
+
+ <update tableName="tc_notifications">
+ <column name="transports" value="web,sms" />
+ <where>web = 1 AND mail = 0 AND sms = 1</where>
+ </update>
+
+ <update tableName="tc_notifications">
+ <column name="transports" value="mail,sms" />
+ <where>web = 0 AND mail = 1 AND sms = 1</where>
+ </update>
+
+ <update tableName="tc_notifications">
+ <column name="transports" value="mail" />
+ <where>web = 0 AND mail = 1 AND sms = 0</where>
+ </update>
+
+ <update tableName="tc_notifications">
+ <column name="transports" value="sms" />
+ <where>web = 0 AND mail = 0 AND sms = 1</where>
+ </update>
+
+ <dropColumn tableName="tc_notifications" columnName="web" />
+ <dropColumn tableName="tc_notifications" columnName="mail" />
+ <dropColumn tableName="tc_notifications" columnName="sms" />
+
+ </changeSet>
+
</databaseChangeLog>