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:
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:
- <changeSet id="schema-drop-from-table-0006-rename" author="author">
- <renameColumn tableName="TABLE1" oldColumnName="COL1" newColumnName="COL1_DROP_ME" />
- </changeSet>
- <changeSet id="schema-drop-from-table-0006-drop" author="author" context="DROP">
- <dropColumn tableName="TABLE1" columnName="COL1_DROP_ME" />
- </changeSet>
Is anyone else doing this? Any comments on this technique?