aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-19 10:14:49 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-19 10:14:49 +1300
commit51a34e4580ecf7973be3f9ef6745f19aeb3cb9c7 (patch)
tree10a8ac0f371ba9fc08e50ca27758f393a160b2c5
parent3bb4c83e70e2898b20e3263c3700d15796caf4a6 (diff)
downloadtrackermap-server-51a34e4580ecf7973be3f9ef6745f19aeb3cb9c7.tar.gz
trackermap-server-51a34e4580ecf7973be3f9ef6745f19aeb3cb9c7.tar.bz2
trackermap-server-51a34e4580ecf7973be3f9ef6745f19aeb3cb9c7.zip
Add column data type for mysql database
-rw-r--r--database/db.changelog-3.1.xml68
-rw-r--r--database/db.changelog-3.2.xml24
2 files changed, 46 insertions, 46 deletions
diff --git a/database/db.changelog-3.1.xml b/database/db.changelog-3.1.xml
index 9557f67e8..4c18f0cc1 100644
--- a/database/db.changelog-3.1.xml
+++ b/database/db.changelog-3.1.xml
@@ -13,19 +13,19 @@
</not>
</preConditions>
- <dropNotNullConstraint tableName="user" columnName="name" />
+ <dropNotNullConstraint tableName="user" columnName="name" columnDataType="VARCHAR(1024)" />
<modifyDataType tableName="user" columnName="name" newDataType="VARCHAR(128)" />
- <addNotNullConstraint tableName="user" columnName="name" />
- <dropNotNullConstraint tableName="user" columnName="email" />
+ <addNotNullConstraint tableName="user" columnName="name" columnDataType="VARCHAR(128)" />
+ <dropNotNullConstraint tableName="user" columnName="email" columnDataType="VARCHAR(256)" />
<modifyDataType tableName="user" columnName="email" newDataType="VARCHAR(128)" />
- <addNotNullConstraint tableName="user" columnName="email" />
- <dropNotNullConstraint tableName="user" columnName="hashedPassword" />
+ <addNotNullConstraint tableName="user" columnName="email" columnDataType="VARCHAR(128)" />
+ <dropNotNullConstraint tableName="user" columnName="hashedPassword" columnDataType="VARCHAR(1024)" />
<modifyDataType tableName="user" columnName="hashedPassword" newDataType="VARCHAR(128)" />
- <addNotNullConstraint tableName="user" columnName="hashedPassword" />
- <dropNotNullConstraint tableName="user" columnName="salt" />
+ <addNotNullConstraint tableName="user" columnName="hashedPassword" columnDataType="VARCHAR(128)" />
+ <dropNotNullConstraint tableName="user" columnName="salt" columnDataType="VARCHAR(1024)" />
<dropDefaultValue tableName="user" columnName="salt" />
<modifyDataType tableName="user" columnName="salt" newDataType="VARCHAR(128)" />
- <addNotNullConstraint tableName="user" columnName="salt" />
+ <addNotNullConstraint tableName="user" columnName="salt" columnDataType="VARCHAR(128)" />
<addDefaultValue tableName="user" columnName="salt" defaultValue="" />
<dropDefaultValue tableName="user" columnName="map" />
<dropNotNullConstraint tableName="user" columnName="map" columnDataType="VARCHAR(128)" />
@@ -39,45 +39,45 @@
<dropDefaultValue tableName="user" columnName="speedUnit" />
<dropNotNullConstraint tableName="user" columnName="speedUnit" columnDataType="VARCHAR(128)" />
<modifyDataType tableName="user" columnName="speedUnit" newDataType="VARCHAR(128)" />
- <dropNotNullConstraint tableName="user" columnName="latitude" />
+ <dropNotNullConstraint tableName="user" columnName="latitude" columnDataType="DOUBLE" />
<dropDefaultValue tableName="user" columnName="latitude" />
<modifyDataType tableName="user" columnName="latitude" newDataType="FLOAT" />
- <addNotNullConstraint tableName="user" columnName="latitude" />
+ <addNotNullConstraint tableName="user" columnName="latitude" columnDataType="FLOAT" />
<addDefaultValue tableName="user" columnName="latitude" defaultValueNumeric="0" />
- <dropNotNullConstraint tableName="user" columnName="longitude" />
+ <dropNotNullConstraint tableName="user" columnName="longitude" columnDataType="DOUBLE" />
<dropDefaultValue tableName="user" columnName="longitude" />
<modifyDataType tableName="user" columnName="longitude" newDataType="FLOAT" />
- <addNotNullConstraint tableName="user" columnName="longitude" />
+ <addNotNullConstraint tableName="user" columnName="longitude" columnDataType="FLOAT" />
<addDefaultValue tableName="user" columnName="longitude" defaultValueNumeric="0" />
- <dropNotNullConstraint tableName="device" columnName="name" />
+ <dropNotNullConstraint tableName="device" columnName="name" columnDataType="VARCHAR(1024)" />
<modifyDataType tableName="device" columnName="name" newDataType="VARCHAR(128)" />
- <addNotNullConstraint tableName="device" columnName="name" />
- <dropNotNullConstraint tableName="device" columnName="uniqueId" />
+ <addNotNullConstraint tableName="device" columnName="name" columnDataType="VARCHAR(128)" />
+ <dropNotNullConstraint tableName="device" columnName="uniqueId" columnDataType="VARCHAR(256)" />
<modifyDataType tableName="device" columnName="uniqueId" newDataType="VARCHAR(128)" />
- <addNotNullConstraint tableName="device" columnName="uniqueId" />
+ <addNotNullConstraint tableName="device" columnName="uniqueId" columnDataType="VARCHAR(128)" />
<modifyDataType tableName="device" columnName="status" newDataType="VARCHAR(128)" />
<modifyDataType tableName="position" columnName="protocol" newDataType="VARCHAR(128)" />
- <dropNotNullConstraint tableName="position" columnName="latitude" />
+ <dropNotNullConstraint tableName="position" columnName="latitude" columnDataType="DOUBLE" />
<modifyDataType tableName="position" columnName="latitude" newDataType="FLOAT" />
- <addNotNullConstraint tableName="position" columnName="latitude" />
- <dropNotNullConstraint tableName="position" columnName="longitude" />
+ <addNotNullConstraint tableName="position" columnName="latitude" columnDataType="FLOAT" />
+ <dropNotNullConstraint tableName="position" columnName="longitude" columnDataType="DOUBLE" />
<modifyDataType tableName="position" columnName="longitude" newDataType="FLOAT" />
- <addNotNullConstraint tableName="position" columnName="longitude" />
- <dropNotNullConstraint tableName="position" columnName="altitude" />
+ <addNotNullConstraint tableName="position" columnName="longitude" columnDataType="FLOAT" />
+ <dropNotNullConstraint tableName="position" columnName="altitude" columnDataType="DOUBLE" />
<modifyDataType tableName="position" columnName="altitude" newDataType="FLOAT" />
- <addNotNullConstraint tableName="position" columnName="altitude" />
- <dropNotNullConstraint tableName="position" columnName="speed" />
+ <addNotNullConstraint tableName="position" columnName="altitude" columnDataType="FLOAT" />
+ <dropNotNullConstraint tableName="position" columnName="speed" columnDataType="DOUBLE" />
<modifyDataType tableName="position" columnName="speed" newDataType="FLOAT" />
- <addNotNullConstraint tableName="position" columnName="speed" />
- <dropNotNullConstraint tableName="position" columnName="course" />
+ <addNotNullConstraint tableName="position" columnName="speed" columnDataType="FLOAT" />
+ <dropNotNullConstraint tableName="position" columnName="course" columnDataType="DOUBLE" />
<modifyDataType tableName="position" columnName="course" newDataType="FLOAT" />
- <addNotNullConstraint tableName="position" columnName="course" />
+ <addNotNullConstraint tableName="position" columnName="course" columnDataType="FLOAT" />
<modifyDataType tableName="position" columnName="address" newDataType="VARCHAR(512)" />
- <dropNotNullConstraint tableName="position" columnName="other" />
+ <dropNotNullConstraint tableName="position" columnName="other" columnDataType="VARCHAR(8192)" />
<modifyDataType tableName="position" columnName="other" newDataType="VARCHAR(4096)" />
- <addNotNullConstraint tableName="position" columnName="other" />
+ <addNotNullConstraint tableName="position" columnName="other" columnDataType="VARCHAR(4096)" />
<createIndex tableName="position" indexName="position_deviceId_fixTime">
<column name="deviceId" />
@@ -85,9 +85,9 @@
</createIndex>
<modifyDataType tableName="data" columnName="protocol" newDataType="VARCHAR(128)" />
- <dropNotNullConstraint tableName="data" columnName="other" />
+ <dropNotNullConstraint tableName="data" columnName="other" columnDataType="VARCHAR(8192)" />
<modifyDataType tableName="data" columnName="other" newDataType="VARCHAR(4096)" />
- <addNotNullConstraint tableName="data" columnName="other" />
+ <addNotNullConstraint tableName="data" columnName="other" columnDataType="VARCHAR(4096)" />
<addColumn tableName="server">
<column name="map" type="VARCHAR(128)" />
@@ -101,13 +101,13 @@
<addColumn tableName="server">
<column name="speedUnit" type="VARCHAR(128)" />
</addColumn>
- <dropNotNullConstraint tableName="server" columnName="latitude" />
+ <dropNotNullConstraint tableName="server" columnName="latitude" columnDataType="DOUBLE" />
<modifyDataType tableName="server" columnName="latitude" newDataType="FLOAT" />
- <addNotNullConstraint tableName="server" columnName="latitude" />
+ <addNotNullConstraint tableName="server" columnName="latitude" columnDataType="FLOAT" />
<addDefaultValue tableName="server" columnName="latitude" defaultValueNumeric="0" />
- <dropNotNullConstraint tableName="server" columnName="longitude" />
+ <dropNotNullConstraint tableName="server" columnName="longitude" columnDataType="DOUBLE" />
<modifyDataType tableName="server" columnName="longitude" newDataType="FLOAT" />
- <addNotNullConstraint tableName="server" columnName="longitude" />
+ <addNotNullConstraint tableName="server" columnName="longitude" columnDataType="FLOAT" />
<addDefaultValue tableName="server" columnName="longitude" defaultValueNumeric="0" />
<dropTable tableName="traccar" />
diff --git a/database/db.changelog-3.2.xml b/database/db.changelog-3.2.xml
index 015c71588..750e91dc8 100644
--- a/database/db.changelog-3.2.xml
+++ b/database/db.changelog-3.2.xml
@@ -13,25 +13,25 @@
</not>
</preConditions>
- <dropNotNullConstraint tableName="user" columnName="latitude" />
+ <dropNotNullConstraint tableName="user" columnName="latitude" columnDataType="FLOAT" />
<dropDefaultValue tableName="user" columnName="latitude" />
<modifyDataType tableName="user" columnName="latitude" newDataType="DOUBLE" />
- <addNotNullConstraint tableName="user" columnName="latitude" />
+ <addNotNullConstraint tableName="user" columnName="latitude" columnDataType="DOUBLE" />
<addDefaultValue tableName="user" columnName="latitude" defaultValueNumeric="0" />
- <dropNotNullConstraint tableName="user" columnName="longitude" />
+ <dropNotNullConstraint tableName="user" columnName="longitude" columnDataType="FLOAT" />
<dropDefaultValue tableName="user" columnName="longitude" />
<modifyDataType tableName="user" columnName="longitude" newDataType="DOUBLE" />
- <addNotNullConstraint tableName="user" columnName="longitude" />
+ <addNotNullConstraint tableName="user" columnName="longitude" columnDataType="DOUBLE" />
<addDefaultValue tableName="user" columnName="longitude" defaultValueNumeric="0" />
<dropColumn tableName="device" columnName="dataId" />
- <dropNotNullConstraint tableName="position" columnName="latitude" />
+ <dropNotNullConstraint tableName="position" columnName="latitude" columnDataType="FLOAT" />
<modifyDataType tableName="position" columnName="latitude" newDataType="DOUBLE" />
- <addNotNullConstraint tableName="position" columnName="latitude" />
- <dropNotNullConstraint tableName="position" columnName="longitude" />
+ <addNotNullConstraint tableName="position" columnName="latitude" columnDataType="DOUBLE" />
+ <dropNotNullConstraint tableName="position" columnName="longitude" columnDataType="FLOAT" />
<modifyDataType tableName="position" columnName="longitude" newDataType="DOUBLE" />
- <addNotNullConstraint tableName="position" columnName="longitude" />
+ <addNotNullConstraint tableName="position" columnName="longitude" columnDataType="DOUBLE" />
<renameColumn tableName="position" oldColumnName="other" newColumnName="attributes" columnDataType="VARCHAR(4096)" />
<dropTable tableName="data" />
@@ -42,12 +42,12 @@
<addColumn tableName="server">
<column name="mapUrl" type="VARCHAR(128)" />
</addColumn>
- <dropNotNullConstraint tableName="server" columnName="latitude" />
+ <dropNotNullConstraint tableName="server" columnName="latitude" columnDataType="FLOAT" />
<modifyDataType tableName="server" columnName="latitude" newDataType="DOUBLE" />
- <addNotNullConstraint tableName="server" columnName="latitude" />
- <dropNotNullConstraint tableName="server" columnName="longitude" />
+ <addNotNullConstraint tableName="server" columnName="latitude" columnDataType="DOUBLE" />
+ <dropNotNullConstraint tableName="server" columnName="longitude" columnDataType="FLOAT" />
<modifyDataType tableName="server" columnName="longitude" newDataType="DOUBLE" />
- <addNotNullConstraint tableName="server" columnName="longitude" />
+ <addNotNullConstraint tableName="server" columnName="longitude" columnDataType="DOUBLE" />
<update tableName="traccar">
<column name="version" valueNumeric="302" />