Rollback script for packages

Hi Folks,

 

I have a question on generating the rollback script for packages. How do I generate a rollback script for a oracle package to a previous state instead of dropping it?

 

I am using the changeset and the file name in the changelog.

<sqlFile path="cust/packages/TEST_PKG.pkb" splitStatements="false" relativeToChangelogFile="false" endDelimiter="\n/"/>
Appreciate your time and help in advance.
Thanks.
 

If you have a different changeSet with the previous definition, you could use the tag with changeSetId changeSetAuthor and changeSetPath to re-reun the previous changeSet.


If you are using runOnChange in your changeSet and just modifying TEST_PKG.pkb then the only way is to have a TEST_PKG_ROLLBACK.pkb file with the previous definition and use a block. When you are going to chagng your definition you would copy the old definition into TEST_PKG_ROLLBACK.pkb and then udpate the TEST_PKG.pkb file.


Nathan