Class LiquibaseMigrationUtils

java.lang.Object
de.xima.fc.liquibase.LiquibaseMigrationUtils

public class LiquibaseMigrationUtils extends Object
  • Field Details

  • Constructor Details

    • LiquibaseMigrationUtils

      public LiquibaseMigrationUtils()
  • Method Details

    • 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

      @Deprecated public static boolean areChangeSetsUnrun(String file, String context, String... ids) throws liquibase.exception.DatabaseException
      Parameters:
      file - String path to the liquibase changeset file
      context - String the liquibase context name
      ids - Strings of the changesets to look for
      Returns:
      Boolean if the changesets have been run
      Throws:
      liquibase.exception.DatabaseException - on errors
    • 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

      @Deprecated public static FCMessage invokeLiquibaseProzess(ELiquibaseCmd lbCmd, String file, String context) throws liquibase.exception.DatabaseException
      Parameters:
      lbCmd - ELiquibaseCmd to perform
      file - String path to the liquibase changeset-file
      context - String the liquibase context-name
      Returns:
      FCMessage as result of the execution
      Throws:
      liquibase.exception.DatabaseException - on errors
    • 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()
    • isRunning

      public static boolean isRunning()