aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-18 22:40:36 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-18 22:40:36 +1300
commit8aecb79dddd40fc5b5a2cbb390c8a1f108f28265 (patch)
tree6cb0137556b7626c8c796248e6fd725659be1685
parentcfceba4f5e1e84fb1690ee95eb3c7172771e9e30 (diff)
downloadtrackermap-server-8aecb79dddd40fc5b5a2cbb390c8a1f108f28265.tar.gz
trackermap-server-8aecb79dddd40fc5b5a2cbb390c8a1f108f28265.tar.bz2
trackermap-server-8aecb79dddd40fc5b5a2cbb390c8a1f108f28265.zip
Workarounds for quoted table and columns
-rw-r--r--database/db.changelog-3.2.xml16
-rw-r--r--database/db.changelog-3.3.xml18
2 files changed, 34 insertions, 0 deletions
diff --git a/database/db.changelog-3.2.xml b/database/db.changelog-3.2.xml
index 576713dc7..ebee6b9e1 100644
--- a/database/db.changelog-3.2.xml
+++ b/database/db.changelog-3.2.xml
@@ -5,6 +5,22 @@
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.2-normalize">
+
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <columnExists tableName="user" columnName="id"/>
+ </not>
+ </preConditions>
+
+ <renameTable oldTableName="quotedUser" newTableName="user" />
+
+ <modifySql>
+ <replace replace="quotedUser" with="&quot;user&quot;" />
+ </modifySql>
+
+ </changeSet>
+
<changeSet author="author" id="changelog-3.2">
<preConditions onFail="MARK_RAN">
diff --git a/database/db.changelog-3.3.xml b/database/db.changelog-3.3.xml
index cb9823ef8..54b1fa9eb 100644
--- a/database/db.changelog-3.3.xml
+++ b/database/db.changelog-3.3.xml
@@ -5,6 +5,24 @@
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.3-normalize">
+
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <columnExists tableName="user_device" columnName="read"/>
+ </not>
+ </preConditions>
+
+ <renameColumn tableName="user_device" oldColumnName="quotedRead" newColumnName="read" />
+ <renameColumn tableName="user_device" oldColumnName="quotedWrite" newColumnName="write" />
+
+ <modifySql>
+ <replace replace="quotedRead" with="&quot;read&quot;" />
+ <replace replace="quotedWrite" with="&quot;write&quot;" />
+ </modifySql>
+
+ </changeSet>
+
<changeSet author="author" id="changelog-3.3">
<dropDefaultValue tableName="user" columnName="salt" />