Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Replace whitespace to preserve Liquibase checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Sep 30, 2013
1 parent 5ab0160 commit b770295
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 122 deletions.
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

Expand All @@ -20,7 +20,7 @@
<comment>h2 baseline schema</comment>
<sqlFile path="db/h2/h2_baseline.sql" stripComments="true" />
</changeSet>

<changeSet id="1" author="camunoz@redhat.com" dbms="mysql" failOnError="false" runAlways="true">
<comment>Set session's default storage engine to INNODB (mysql ver &gt; 5.5)</comment>
<sql>SET storage_engine=InnoDB</sql>
Expand Down
10 changes: 5 additions & 5 deletions zanata-war/src/main/resources/db/changelogs/db.changelog-1.2.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<changeSet author="sflaniga@redhat.com" id="1">

<validCheckSum>cfb156591044f08e333d7ca2d5638db3</validCheckSum>

<comment>remove HCommunity tables</comment>

<dropForeignKeyConstraint
constraintName="FK8BEBF03860C55B1B"
baseTableName="HCommunity_Member"/>
Expand Down
42 changes: 21 additions & 21 deletions zanata-war/src/main/resources/db/changelogs/db.changelog-1.3.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<changeSet author="hding@redhat.com" id="1">
<comment>Add flag for project and project version to support a customized list of locales</comment>
<addColumn tableName="HProject">
Expand All @@ -19,33 +19,33 @@
</column>
</addColumn>
</changeSet>

<changeSet author="hding@redhat.com" id="2">
<comment>Add tables to store the customized list of locales for project</comment>
<createTable tableName="HProject_Locale">
<column name="projectId" type="bigint">
<column name="projectId" type="bigint">
<constraints nullable="false" />
</column>
<column name="localeId" type="bigint">
<constraints nullable="false" />
</column>
</createTable>
<addPrimaryKey tableName = "HProject_Locale"
<addPrimaryKey tableName = "HProject_Locale"
columnNames = "projectId, localeId"/>
<addForeignKeyConstraint
baseTableName = "HProject_Locale"
baseColumnNames = "projectId"
<addForeignKeyConstraint
baseTableName = "HProject_Locale"
baseColumnNames = "projectId"
constraintName = "FKHPROJECTLOCALEPRO"
referencedTableName = "HProject"
referencedColumnNames = "id"/>
<addForeignKeyConstraint
baseTableName = "HProject_Locale"
baseColumnNames = "localeId"
<addForeignKeyConstraint
baseTableName = "HProject_Locale"
baseColumnNames = "localeId"
constraintName = "FKHPROJECTLOCALELOC"
referencedTableName = "HLocale"
referencedColumnNames = "id"/>
</changeSet>

<changeSet author="hding@redhat.com" id="3">
<comment>Add tables to store the customized list of locales for project version</comment>
<createTable tableName="HProjectIteration_Locale">
Expand All @@ -56,17 +56,17 @@
<constraints nullable="false" />
</column>
</createTable>
<addPrimaryKey tableName = "HProjectIteration_Locale"
<addPrimaryKey tableName = "HProjectIteration_Locale"
columnNames = "projectIterationId, localeId"/>
<addForeignKeyConstraint
baseTableName = "HProjectIteration_Locale"
baseColumnNames = "projectIterationId"
<addForeignKeyConstraint
baseTableName = "HProjectIteration_Locale"
baseColumnNames = "projectIterationId"
constraintName = "FKHPROJECTITELOCPRO"
referencedTableName = "HProjectIteration"
referencedColumnNames = "id"/>
<addForeignKeyConstraint
baseTableName = "HProjectIteration_Locale"
baseColumnNames = "localeId"
<addForeignKeyConstraint
baseTableName = "HProjectIteration_Locale"
baseColumnNames = "localeId"
constraintName = "FKHPROJECTITELOCLOC"
referencedTableName = "HLocale"
referencedColumnNames = "id"/>
Expand Down
22 changes: 11 additions & 11 deletions zanata-war/src/main/resources/db/changelogs/db.changelog-1.4.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<changeSet author="camunoz@redhat.com" id="1">
<comment>Add a flag indicating when a member of a Language team (locale) is a team coordinator.</comment>
<addColumn tableName="HLocale_Member">
Expand All @@ -17,39 +17,39 @@

<changeSet author="damason@redhat.com" id="1">
<comment>rename admin email key to zanata from address</comment>
<!--
<!--
<sql>update HApplicationConfiguration set key="zanata.email.from.addr" where key="flies.admin.email"</sql>
-->
<update tableName="HApplicationConfiguration">
<column name="config_key" value="zanata.email.from.addr"/>
<where>config_key='flies.admin.email'</where>
</update>
</changeSet>

<changeSet author="camunoz@redhat.com" id="2">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="0">
select count(*) from HAccountRoleGroup arg, HAccountRole ac1, HAccountRole ac2
select count(*) from HAccountRoleGroup arg, HAccountRole ac1, HAccountRole ac2
where arg.roleId = ac1.id and arg.memberOf = ac2.id and ac1.name = 'user' and ac2.name = 'translator'
</sqlCheck>
</preConditions>
<comment>
Remove language team memberships from all non-translator users.
Remove language team memberships from all non-translator users.
Only done when users are not part of the translator group by default.
</comment>
<delete tableName="HLocale_Member">
<where>
personId in
(
select id from HPerson where accountId not in
select id from HPerson where accountId not in
(
select am.accountId from HAccountMembership am, HAccountRole ar
select am.accountId from HAccountMembership am, HAccountRole ar
where am.memberOf = ar.id
and (ar.name = 'translator' or ar.name = 'admin')
)
)
</where>
</delete>
</changeSet>

</databaseChangeLog>
22 changes: 11 additions & 11 deletions zanata-war/src/main/resources/db/changelogs/db.changelog-1.5.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

Expand Down Expand Up @@ -125,21 +125,21 @@
<constraints nullable="false" />
</column>
</addColumn>

<addForeignKeyConstraint baseTableName="HGlossaryEntry"
baseColumnNames="srcLocaleId" constraintName="UKglossaryentry_srcLocaleId"
referencedTableName="HLocale" referencedColumnNames="id" />

<addColumn tableName="HGlossaryEntry">
<column name="sourceRef" type="longtext"/>
</addColumn>
</addColumn>
</changeSet>

<changeSet author="aeng@redhat.com" id="8" dbms="mysql">
<comment>Alter glossary tables - remove sourceRef/add auto increment</comment>

<dropColumn tableName="HGlossaryTerm" columnName="sourceRef" />

<addAutoIncrement tableName="HGlossaryEntry" columnName="id" columnDataType="bigint"/>
<addAutoIncrement tableName="HGlossaryTerm" columnName="id" columnDataType="bigint"/>
<addAutoIncrement tableName="HTermComment" columnName="id" columnDataType="bigint"/>
Expand All @@ -149,7 +149,7 @@
<comment>Alter glossary tables - remove sourceRef/add auto increment</comment>
<dropColumn tableName="HGlossaryTerm" columnName="sourceRef" />
</changeSet>

<changeSet author="aeng@redhat.com" id="9">
<comment>Alter glossary term table - remove constraint</comment>
<dropForeignKeyConstraint baseTableName="HTermComment" constraintName="UKtermComment_glossaryTerm" />
Expand All @@ -163,7 +163,7 @@
</column>
</addColumn>
</changeSet>

<changeSet author="aeng@redhat.com" id="11">
<comment>Add obsolete column to HProjectIteration</comment>
<addColumn tableName="HProjectIteration">
Expand Down
30 changes: 15 additions & 15 deletions zanata-war/src/main/resources/db/changelogs/db.changelog-1.6.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

Expand All @@ -18,44 +18,44 @@
<constraints nullable="false" />
</column>
</addColumn>

<addColumn tableName="HProject">
<column name="status" type="varchar(255)">
<constraints nullable="false"/>
</column>
</addColumn>
</changeSet>

</changeSet>
<changeSet author="aeng@redhat.com" id="2">
<validCheckSum>8b576cc32f673719e6bc7c6fb272469</validCheckSum>
<validCheckSum>deb0ab78fddee055f538a735c586ebe6</validCheckSum>
<comment>Insert HProjectIteration/HProject status column with 'Current'</comment>

<sql>UPDATE HProjectIteration SET status='Current' WHERE active='1'</sql>
<sql>UPDATE HProjectIteration SET status='Retired' WHERE active='0'</sql>
<sql>UPDATE HProject SET status='Current'</sql>
</changeSet>


<changeSet author="aeng@redhat.com" id="3">
<comment>Alter HProjectIteration - removed active column</comment>
<dropColumn tableName="HProjectIteration" columnName="active" />
</changeSet>

<changeSet author="aeng@redhat.com" id="4">
<comment>Alter HProjectIteration/HProject - removed obsolete column</comment>
<dropColumn tableName="HProjectIteration" columnName="obsolete" />
<dropColumn tableName="HProject" columnName="obsolete" />
</changeSet>

<changeSet author="aeng@redhat.com" id="5">
<comment>Update 'Current' to 'ACTIVE' and 'Retired' to 'READONLY'</comment>
<sql>UPDATE HProject SET status='ACTIVE' WHERE status='Current'</sql>
<sql>UPDATE HProject SET status='READONLY' where status='Retired'</sql>
<sql>UPDATE HProjectIteration SET status='ACTIVE' WHERE status='Current'</sql>
<sql>UPDATE HProjectIteration SET status='READONLY' where status='Retired'</sql>
</changeSet>

<changeSet author="aeng@redhat.com" id="6">
<comment>Update 'Obsolete' to 'OBSOLETE'</comment>
<sql>UPDATE HProject SET status='OBSOLETE' WHERE status='Obsolete'</sql>
Expand All @@ -77,7 +77,7 @@
<column name="status" type="char(1)"/>
</ext:modifyColumn>
</changeSet>

<changeSet author="camunoz@redhat.com" id="1-h2" dbms="h2">
<comment>Create H2 database Hash function.</comment>
<sql>CREATE ALIAS MD5 FOR "org.zanata.util.HashUtil.generateHash"</sql>
Expand All @@ -95,7 +95,7 @@
<createIndex tableName="HTextFlow" indexName="Idx_ContentHash">
<column name="contentHash"/>
</createIndex>
<sql>UPDATE HTextFlow SET contentHash = MD5(content)</sql>
<sql>UPDATE HTextFlow SET contentHash = MD5(content)</sql>
</changeSet>

<!-- renamed from changeset(camunoz@redhat.com:2 and sflanigan@redhat.com:2) to ensure preconditions are checked again -->
Expand All @@ -116,6 +116,6 @@
<!--
This changelog file (despite the filename) is actually part 2 of the changes for Zanata 1.5.
Please start a new file (eg db.changelog-1.6a.xml) for the 1.6 dev cycle.
-->
-->

</databaseChangeLog>

0 comments on commit b770295

Please sign in to comment.