aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--database/db.changelog-3.1.xml19
-rw-r--r--database/db.changelog-3.2.xml2
-rw-r--r--database/db.changelog-3.3.xml4
3 files changed, 10 insertions, 15 deletions
diff --git a/database/db.changelog-3.1.xml b/database/db.changelog-3.1.xml
index 589356863..db171e6a8 100644
--- a/database/db.changelog-3.1.xml
+++ b/database/db.changelog-3.1.xml
@@ -41,11 +41,6 @@
<modifyDataType tableName="device" columnName="name" newDataType="VARCHAR(128)" />
<modifyDataType tableName="device" columnName="uniqueId" newDataType="VARCHAR(128)" />
<modifyDataType tableName="device" columnName="status" newDataType="VARCHAR(128)" />
-
- <dropIndex tableName="user_device" indexName="user_device_user_id" />
- <createIndex tableName="user_device" indexName="user_device_userId">
- <column name="userId" />
- </createIndex>
<modifyDataType tableName="position" columnName="protocol" newDataType="VARCHAR(128)" />
<modifyDataType tableName="position" columnName="latitude" newDataType="FLOAT" />
@@ -81,13 +76,13 @@
<modifyDataType tableName="server" columnName="longitude" newDataType="FLOAT" />
<addDefaultValue tableName="server" columnName="longitude" defaultValueNumeric="0" />
- <dropPrimaryKey tableName="traccar" />
- <addColumn tableName="traccar">
- <column name="version" type="INT" defaultValueNumeric="0">
- <constraints nullable="false" />
- </column>
- </addColumn>
- <dropColumn tableName="traccar" columnName="id" />
+ <dropTable tableName="traccar" />
+
+ <createTable tableName="traccar">
+ <column name="version" type="INT" defaultValueNumeric="0">
+ <constraints nullable="false" />
+ </column>
+ </createTable>
<insert tableName="traccar">
<column name="version" valueNumeric="301" />
diff --git a/database/db.changelog-3.2.xml b/database/db.changelog-3.2.xml
index ebee6b9e1..8c7a0cc8a 100644
--- a/database/db.changelog-3.2.xml
+++ b/database/db.changelog-3.2.xml
@@ -40,7 +40,7 @@
<modifyDataType tableName="position" columnName="latitude" newDataType="DOUBLE" />
<modifyDataType tableName="position" columnName="longitude" newDataType="DOUBLE" />
- <renameColumn tableName="position" oldColumnName="other" newColumnName="attributes" />
+ <renameColumn tableName="position" oldColumnName="other" newColumnName="attributes" columnDataType="VARCHAR(4096)" />
<dropTable tableName="data" />
diff --git a/database/db.changelog-3.3.xml b/database/db.changelog-3.3.xml
index 54b1fa9eb..4c5c216db 100644
--- a/database/db.changelog-3.3.xml
+++ b/database/db.changelog-3.3.xml
@@ -13,8 +13,8 @@
</not>
</preConditions>
- <renameColumn tableName="user_device" oldColumnName="quotedRead" newColumnName="read" />
- <renameColumn tableName="user_device" oldColumnName="quotedWrite" newColumnName="write" />
+ <renameColumn tableName="user_device" oldColumnName="quotedRead" newColumnName="read" columnDataType="BOOLEAN" />
+ <renameColumn tableName="user_device" oldColumnName="quotedWrite" newColumnName="write" columnDataType="BOOLEAN" />
<modifySql>
<replace replace="quotedRead" with="&quot;read&quot;" />