Workarounds for quoted table and columns

This commit is contained in:
Anton Tananaev
2015-12-18 22:40:36 +13:00
parent cfceba4f5e
commit 8aecb79ddd
2 changed files with 34 additions and 0 deletions

View File

@@ -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">

View File

@@ -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" />