Class LiquibaseHelper


  • public class LiquibaseHelper
    extends Object
    The LiquibaseHelper class provides helpers to migrate a database and generate new migrations. It is a thin layer that wraps JPA and Liquibase. By default, migrations are added to src/main/resources/changelog.xml. The recommended workflow is to (1) generate a migration, (2) manually inspect the migration, and (3) run the migration if everything looks ok.
    • Constructor Detail

      • LiquibaseHelper

        public LiquibaseHelper​(Map<String,​String> props)
        Creates a new helper.
        Parameters:
        props -
    • Method Detail

      • getResourcesDir

        public File getResourcesDir()
      • getMasterChangeLogFile

        public File getMasterChangeLogFile()
      • migrate

        public void migrate()
                     throws liquibase.exception.LiquibaseException,
                            SQLException
        Helper utility to perform a Liquibase database migration.
        Throws:
        liquibase.exception.LiquibaseException
        SQLException
        See Also:
        Liquibase.update(String)