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

Are using contexts a best practice for revertible drop using a rename

$
0
0
Hello!

I'm trying to make my liquibase changesets in a manner that gives an opportunity to rollback, even when the final intent of my action is to drop data.The idea being that the first time I run it, i give it the "SAFE" context, which, by default, runs anything without a context, and, a week later, I run it with the "DROP" context, when I'm ready to commit to losing the data. In this effort, I've started doing this:
  1. <changeSet id="schema-drop-from-table-0006-rename" author="author">
  2.     <renameColumn tableName="TABLE1" oldColumnName="COL1" newColumnName="COL1_DROP_ME" />
  3. </changeSet>
  4.     <changeSet id="schema-drop-from-table-0006-drop" author="author" context="DROP">
  5.     <dropColumn tableName="TABLE1" columnName="COL1_DROP_ME" />
  6. </changeSet>
Is anyone else doing this? Any comments on this technique?

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>