Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Good practices - Use of LiquiBase packages and SVN

$
0
0

We change our deploy script to use liquibase but now I begin to have to some issues that I would like to have another opinion or maybe know a proper solution for that.

We are using Oracle, and we have a lot of legacy code: packages, functions, procedures, triggers.. (as you can see, a lot of logic in the data base).

We are using the follow structure:

  1. .
  2. ..
  3. packages
  4. functions
  5. databaseline
  6. S1304
  7. S1305
  8. S1308

The xx-changelog.xml looks like this:

  1. <include file="baseline/xxx-baseline-changelog.xml" relativeToChangelogFile="true"/> 

  2. <!- Sprint change logs --> 
  3. <include file="S1304/xxx-s1304-changelog.xml" relativeToChangelogFile="true" /> 
  4. <include file="S1308/xxx-s1308-changelog.xml" relativeToChangelogFile="true"/> 
  5. <include file="S1309/xxx-s1309-changelog.xml" relativeToChangelogFile="true"/> 
  6. <include file="S1310/xxx-s1310-changelog.xml" relativeToChangelogFile="true"/> 
  7. <include file="S1311/xxx-s1311-changelog.xml" relativeToChangelogFile="true"/>

Because we don't want to copy the file every time in a new folder, we are pointing to the same file, and because we are changing the content, we have to set runOnChange property, because if we don't do it will fail.

The thing is that we are working in Agile, and every 3 weeks we deliver new code, sometimes we have to change one package in one sprint and we have to change the same package in the next one.

My situation is:

1) if we add a new changeSet for each sprint, pointing to the file in packages folder, for example with runOnchange, this will execute all the changeSet that are pointing to these file because the content is diferent, and is runOnchange (is not what i want). But is the only way to know the changes in the sprint, and have track of this.

xxx-s1311-changelog.xml

  1. <changeSet id="XXX_SEND_TO_PP_PCK_S1311" author="e-ballo" runOnChange="true">
  2. <sqlFile path="../packages/XXX_SEND_TO_PP_PCK.pkb" splitStatements="false" relativeToChangelogFile="true"/> 
  3. </changeSet>

xxx-s1312-changelog.xml

  1. <changeSet id="XXX_SEND_TO_PP_PCK_S1312" author="e-ballo" runOnChange="true">
  2. <sqlFile path="../packages/XXX_SEND_TO_PP_PCK.pkb" splitStatements="false" relativeToChangelogFile="true"/>
  3. </changeSet>

2) if we create a file only for packages (packages-changelog.xml) and we add the changeSet for the package with the property runOnChange, is going to run every time the file change, but you don't have visibility to know when we change it.

Maybe the best solution is to copy the file (the package) in the folder of the sprint, but I would like to keep the history of the file in the SVN and also have a clear idea of the new changes for sprint in the change log.

My question:

So do you know guys if there is some way to disable the hashmap in liquibase ? then I will be able to add it in every sprint and have a track.. and if the id is already in the database should not execute again, am I right ?

Thanks in advance,


Viewing all articles
Browse latest Browse all 2993

Trending Articles