aboutsummaryrefslogtreecommitdiff
path: root/database/db.changelog-3.0.xml
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-03 10:52:10 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-03 10:52:10 +1300
commit07412baa3500a8ff4086adb0edf03c9bd2a69310 (patch)
treebcfb5b70f9057bd763765a0a447669c4f8c30dae /database/db.changelog-3.0.xml
parenta05541ee221b261a4554e27487d4ecf8f466a1e4 (diff)
downloadtraccar-server-07412baa3500a8ff4086adb0edf03c9bd2a69310.tar.gz
traccar-server-07412baa3500a8ff4086adb0edf03c9bd2a69310.tar.bz2
traccar-server-07412baa3500a8ff4086adb0edf03c9bd2a69310.zip
Start db changelogs from scratch
Diffstat (limited to 'database/db.changelog-3.0.xml')
-rw-r--r--database/db.changelog-3.0.xml207
1 files changed, 0 insertions, 207 deletions
diff --git a/database/db.changelog-3.0.xml b/database/db.changelog-3.0.xml
deleted file mode 100644
index 453f6f00b..000000000
--- a/database/db.changelog-3.0.xml
+++ /dev/null
@@ -1,207 +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">
-
- <changeSet author="author" id="changelog-3.0">
-
- <preConditions onFail="MARK_RAN">
- <not>
- <tableExists tableName="traccar" />
- </not>
- </preConditions>
-
- <createTable tableName="user">
- <column name="id" type="INT" autoIncrement="true">
- <constraints primaryKey="true" />
- </column>
- <column name="name" type="VARCHAR(1024)">
- <constraints nullable="false" />
- </column>
- <column name="email" type="VARCHAR(256)">
- <constraints nullable="false" />
- </column>
- <column name="hashedPassword" type="VARCHAR(1024)">
- <constraints nullable="false" />
- </column>
- <column name="salt" type="VARCHAR(1024)" defaultValue="">
- <constraints nullable="false" />
- </column>
- <column name="readonly" type="BOOLEAN" defaultValueBoolean="false">
- <constraints nullable="false" />
- </column>
- <column name="admin" type="BOOLEAN" defaultValueBoolean="false">
- <constraints nullable="false" />
- </column>
- <column name="map" type="VARCHAR(1024)" defaultValue="osm">
- <constraints nullable="false" />
- </column>
- <column name="language" type="VARCHAR(1024)" defaultValue="en">
- <constraints nullable="false" />
- </column>
- <column name="distanceUnit" type="VARCHAR(1024)" defaultValue="km">
- <constraints nullable="false" />
- </column>
- <column name="speedUnit" type="VARCHAR(1024)" defaultValue="kmh">
- <constraints nullable="false" />
- </column>
- <column name="latitude" type="DOUBLE" defaultValueNumeric="0">
- <constraints nullable="false" />
- </column>
- <column name="longitude" type="DOUBLE" defaultValueNumeric="0">
- <constraints nullable="false" />
- </column>
- <column name="zoom" type="INT" defaultValueNumeric="0">
- <constraints nullable="false" />
- </column>
- </createTable>
-
- <addUniqueConstraint tableName="user" columnNames="email" constraintName="uk_user_email" />
-
- <createTable tableName="device">
- <column name="id" type="INT" autoIncrement="true">
- <constraints primaryKey="true" />
- </column>
- <column name="name" type="VARCHAR(1024)">
- <constraints nullable="false" />
- </column>
- <column name="uniqueId" type="VARCHAR(256)">
- <constraints nullable="false" />
- </column>
- <column name="status" type="VARCHAR(1024)" />
- <column name="lastUpdate" type="TIMESTAMP" />
- <column name="positionId" type="INT" />
- <column name="dataId" type="INT" />
- </createTable>
-
- <addUniqueConstraint tableName="device" columnNames="uniqueId" constraintName="uk_device_uniqueId" />
-
- <createTable tableName="user_device">
- <column name="userId" type="INT">
- <constraints nullable="false" />
- </column>
- <column name="deviceId" type="INT">
- <constraints nullable="false" />
- </column>
- <column name="read" type="BOOLEAN" defaultValueBoolean="true">
- <constraints nullable="false" />
- </column>
- <column name="write" type="BOOLEAN" defaultValueBoolean="true">
- <constraints nullable="false" />
- </column>
- </createTable>
-
- <addForeignKeyConstraint baseTableName="user_device" baseColumnNames="userId" constraintName="fk_user_device_userId" referencedTableName="user" referencedColumnNames="id" onDelete="CASCADE" />
- <addForeignKeyConstraint baseTableName="user_device" baseColumnNames="deviceId" constraintName="fk_user_device_deviceId" referencedTableName="device" referencedColumnNames="id" onDelete="CASCADE" />
-
- <createIndex tableName="user_device" indexName="user_device_user_id">
- <column name="userId" />
- </createIndex>
-
- <createTable tableName="position">
- <column name="id" type="INT" autoIncrement="true">
- <constraints primaryKey="true" />
- </column>
- <column name="protocol" type="VARCHAR(1024)" />
- <column name="deviceId" type="int">
- <constraints nullable="false" />
- </column>
- <column name="serverTime" type="TIMESTAMP">
- <constraints nullable="false" />
- </column>
- <column name="deviceTime" type="TIMESTAMP">
- <constraints nullable="false" />
- </column>
- <column name="fixTime" type="TIMESTAMP">
- <constraints nullable="false" />
- </column>
- <column name="valid" type="BOOLEAN">
- <constraints nullable="false" />
- </column>
- <column name="latitude" type="DOUBLE">
- <constraints nullable="false" />
- </column>
- <column name="longitude" type="DOUBLE">
- <constraints nullable="false" />
- </column>
- <column name="altitude" type="DOUBLE">
- <constraints nullable="false" />
- </column>
- <column name="speed" type="DOUBLE">
- <constraints nullable="false" />
- </column>
- <column name="course" type="DOUBLE">
- <constraints nullable="false" />
- </column>
- <column name="address" type="VARCHAR(1024)" />
- <column name="other" type="VARCHAR(8192)">
- <constraints nullable="false" />
- </column>
- </createTable>
-
- <addForeignKeyConstraint baseTableName="position" baseColumnNames="deviceId" constraintName="fk_position_deviceId" referencedTableName="device" referencedColumnNames="id" onDelete="CASCADE" />
-
- <createTable tableName="data">
- <column name="id" type="INT" autoIncrement="true">
- <constraints primaryKey="true" />
- </column>
- <column name="protocol" type="VARCHAR(1024)" />
- <column name="deviceId" type="int">
- <constraints nullable="false" />
- </column>
- <column name="serverTime" type="TIMESTAMP">
- <constraints nullable="false" />
- </column>
- <column name="deviceTime" type="TIMESTAMP">
- <constraints nullable="false" />
- </column>
- <column name="other" type="VARCHAR(8192)">
- <constraints nullable="false" />
- </column>
- </createTable>
-
- <addForeignKeyConstraint baseTableName="data" baseColumnNames="deviceId" constraintName="fk_data_deviceId" referencedTableName="device" referencedColumnNames="id" onDelete="CASCADE" />
-
- <createTable tableName="server">
- <column name="id" type="INT" autoIncrement="true">
- <constraints primaryKey="true" />
- </column>
- <column name="registration" type="BOOLEAN">
- <constraints nullable="false" />
- </column>
- <column name="latitude" type="DOUBLE">
- <constraints nullable="false" />
- </column>
- <column name="longitude" type="DOUBLE">
- <constraints nullable="false" />
- </column>
- <column name="zoom" type="INT">
- <constraints nullable="false" />
- </column>
- </createTable>
-
- <createTable tableName="traccar">
- <column name="id" type="INT" autoIncrement="true">
- <constraints primaryKey="true" />
- </column>
- </createTable>
-
- <insert tableName="server">
- <column name="registration" valueBoolean="true" />
- <column name="latitude" valueNumeric="0" />
- <column name="longitude" valueNumeric="0" />
- <column name="zoom" valueNumeric="0" />
- </insert>
-
- <insert tableName="user">
- <column name="name" value="admin" />
- <column name="email" value="admin" />
- <column name="hashedPassword" value="D33DCA55ABD4CC5BC76F2BC0B4E603FE2C6F61F4C1EF2D47" />
- <column name="salt" value="000000000000000000000000000000000000000000000000" />
- <column name="admin" valueBoolean="true" />
- </insert>
-
- </changeSet>
-</databaseChangeLog>