3 回答

TA貢獻1821條經驗 獲得超5個贊
問題在于on-fail屬性拼寫不正確。on-fail應該是onFail。
最好將先決條件置于特定更改集的范圍內,并且注釋應該在先決條件之后進行,盡管這不是這里的問題。
databaseChangeLog:
? - changeSet:
? ? ? id: zzchange-1.0-remove-xczczxc
? ? ? author: zzzz
? ? ? preConditions:
? ? ? ? onFail: mark_ran
? ? ? ? tableExists:
? ? ? ? ? tableName: some_old_table
? ? ? comment: Remove some_old_table table - no longer needed
? ? ? changes:
? ? ? ? - dropTable:
? ? ? ? ? ? tableName: some_old_table

TA貢獻1866條經驗 獲得超5個贊
在你的第二次嘗試中,在你的先決條件之后發表你的評論
databaseChangeLog:
? - changeSet:
? ? ? id: zzchange-1.0-remove-xczczxc
? ? ? author: zzzz
? ? ? preConditions:
? ? ? ? on-fail: mark_ran
? ? ? ? tableExists:
? ? ? ? ? tableName: some_old_table
? ? ? comment: Remove some_old_table table - no longer needed
? ? ? changes:
? ? ? ? - dropTable:
? ? ? ? ? ? tableName: some_old_table
我不太確定為什么您的第一次嘗試行不通,但是我認為擁有全局先決條件不是一個好主意。這是因為他們在同一文檔中所說的:
Preconditions at the changelog level apply to all changesets, not just those listed in the current changelog or its child changelogs.
添加回答
舉報