Class LiquibaseMigrationUtils


  • public class LiquibaseMigrationUtils
    extends Object
    • Constructor Detail

      • LiquibaseMigrationUtils

        public LiquibaseMigrationUtils()
    • Method Detail

      • invokeLiquibaseProzess

        public static FCMessage invokeLiquibaseProzess​(ELiquibaseCmd lbCmd)
                                                throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • getUnrunChangesets

        public static List<liquibase.changelog.ChangeSet> getUnrunChangesets()
                                                                      throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • areChangeSetsUnrun

        public static boolean areChangeSetsUnrun​(String... ids)
                                          throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • getUnrunChangesets

        @Deprecated
        public static List<liquibase.changelog.ChangeSet> getUnrunChangesets​(String file,
                                                                             String context)
                                                                      throws liquibase.exception.DatabaseException
        Parameters:
        file - String path to the liquibase changeset file
        context - String the liquibase context name
        Returns:
        List of unrun changesets
        Throws:
        liquibase.exception.DatabaseException - on errors
      • getUnrunChangesets

        public static List<liquibase.changelog.ChangeSet> getUnrunChangesets​(String file,
                                                                             liquibase.Contexts context)
                                                                      throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • areChangeSetsUnrun

        public static boolean areChangeSetsUnrun​(String file,
                                                 liquibase.Contexts context,
                                                 String... ids)
                                          throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • updateDatabase

        @Deprecated
        public static boolean updateDatabase​(String file,
                                             String context)
                                      throws liquibase.exception.DatabaseException
        Parameters:
        file - String path to the liquibase changeset file
        context - String the liquibase context name
        Returns:
        Boolean if successful
        Throws:
        liquibase.exception.DatabaseException - on errors
      • updateDatabase

        public static boolean updateDatabase​(String file,
                                             liquibase.Contexts context)
                                      throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • dropDatabase

        public static boolean dropDatabase​(String file)
                                    throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • invokeLiquibaseProzess

        public static FCMessage invokeLiquibaseProzess​(ELiquibaseCmd lbCmd,
                                                       String file,
                                                       liquibase.Contexts context)
                                                throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • isUpToDate

        public static boolean isUpToDate()