Prevent error when dropping not existing sequences, creating existing users

前端 未结 5 899
北荒
北荒 2020-12-20 16:17

I have a bunch of sql scripts that create / drop sequences, users and other objects. I\'m running these scripts through liquibase, but they fail because oracle complains whe

5条回答
  •  梦毁少年i
    2020-12-20 16:44

    In my experience, based on Liquibase 3.5.1 behaviour, when using failOnError="false", the changeSet does not get recorded as 'RAN' if the operation failed. To me this seems a bug and Nathan's answer does not seem to be correct?

    The downside of this approach is that it will also mark them as ran and continue if they error for some other reason (bad permissions, connection failure, invalid SQL, etc.) The more accurate approach is to use preconditions, like this:

    I.e.: it does not mark them as ran!

提交回复
热议问题