Extensions Best Practices
Remember that users will install a variety of extensions, not just yours. That means you should always be enabling your functionality only when it should be used.
For example, in getPriority()
methods, make sure you are returning NOT_APPLICABLE
when your code is not applicable. Or in supports()
calls, make sure you return false
if that is not a database your code is trying to support.
Remember that just like you are looking to improve Liquibase, others will want to improve your extension. Be open to extension with both your code and your configuration.
For example, don't return Integer.MAX_VALUE
in getPriority()
. Also, consider extracting portions of your logic to protected methods that someone else can subclass and override in their own extensions.
Talk to us on the Liquibase Forum, Liquibase Discord, or
clone it at https://github.com/liquibase/liquibase.wiki.git
and create an issue with a patch file.