liquibase
Class Liquibase

java.lang.Object
  extended by liquibase.Liquibase

public class Liquibase
extends Object

Primary facade class for interacting with Liquibase. The built in command line, Ant, Maven and other ways of running Liquibase are wrappers around methods in this class.


Field Summary
protected  Database database
           
 
Constructor Summary
Liquibase(DatabaseChangeLog changeLog, ResourceAccessor resourceAccessor, Database database)
           
Liquibase(String changeLogFile, ResourceAccessor resourceAccessor, Database database)
          Creates a Liquibase instance.
Liquibase(String changeLogFile, ResourceAccessor resourceAccessor, DatabaseConnection conn)
          Creates a Liquibase instance for a given DatabaseConnection.
 
Method Summary
 CheckSum calculateCheckSum(String changeSetIdentifier)
           
 CheckSum calculateCheckSum(String filename, String id, String author)
           
 void changeLogSync(Contexts contexts)
          Deprecated. use version with LabelExpression
 void changeLogSync(Contexts contexts, LabelExpression labelExpression)
           
 void changeLogSync(Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void changeLogSync(String contexts)
           
 void changeLogSync(String contexts, Writer output)
           
 void checkLiquibaseTables(boolean updateExistingNullChecksums, DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labelExpression)
           
 void clearCheckSums()
          Sets checksums to null so they will be repopulated next run
protected  UpdateVisitor createUpdateVisitor()
           
 DiffResult diff(Database referenceDatabase, Database targetDatabase, CompareControl compareControl)
           
 void dropAll()
          Drops all database objects in the default schema.
 void dropAll(CatalogAndSchema... schemas)
          Drops all database objects in the passed schema(s).
protected  void executeRollbackScript(String rollbackScript, Contexts contexts, LabelExpression labelExpression)
           
 void forceReleaseLocks()
           
 void futureRollbackSQL(Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void futureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void futureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables)
           
protected  void futureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output)
           
protected  void futureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables)
           
 void futureRollbackSQL(Integer count, String contexts, Writer output)
           
 void futureRollbackSQL(Integer count, String contexts, Writer output, boolean checkLiquibaseTables)
           
 void futureRollbackSQL(String tag, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void futureRollbackSQL(String contexts, Writer output)
           
 void futureRollbackSQL(String contexts, Writer output, boolean checkLiquibaseTables)
           
 void futureRollbackSQL(Writer output)
           
 void generateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, ChangeLogSerializer changeLogSerializer, Class<? extends DatabaseObject>... snapshotTypes)
           
 void generateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, Class<? extends DatabaseObject>... snapshotTypes)
           
 void generateDocumentation(String outputDirectory)
           
 void generateDocumentation(String outputDirectory, Contexts contexts, LabelExpression labelExpression)
           
 void generateDocumentation(String outputDirectory, String contexts)
           
 String getChangeLogFile()
          Return the change log file used by this Liquibase instance.
 ChangeLogParameters getChangeLogParameters()
          Returns the ChangeLogParameters container used by this Liquibase instance.
 List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts)
          Deprecated. use version with LabelExpression
 List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts, LabelExpression labelExpression)
           
 List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables)
          Returns the ChangeSetStatuses of all changesets in the change log file and history in the order they would be ran.
 Database getDatabase()
          Returns the Database used by this Liquibase instance.
 DatabaseChangeLog getDatabaseChangeLog()
           
 ResourceAccessor getFileOpener()
          Deprecated. use the newer-terminology version getResourceAccessor()
 Logger getLog()
          Return the log used by this Liquibase instance.
 ResourceAccessor getResourceAccessor()
          Return ResourceAccessor used by this Liquibase instance.
protected  ChangeLogIterator getStandardChangelogIterator(Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog)
           
 boolean isIgnoreClasspathPrefix()
           
 boolean isSafeToRunUpdate()
          Returns true if it is "save" to migrate the database.
 DatabaseChangeLogLock[] listLocks()
          Display change log lock information.
 Collection<RanChangeSet> listUnexpectedChangeSets(Contexts contexts, LabelExpression labelExpression)
           
 Collection<RanChangeSet> listUnexpectedChangeSets(String contexts)
           
 List<ChangeSet> listUnrunChangeSets(Contexts contexts)
          Deprecated. use version with LabelExpression
 List<ChangeSet> listUnrunChangeSets(Contexts contexts, LabelExpression labels)
           
protected  List<ChangeSet> listUnrunChangeSets(Contexts contexts, LabelExpression labels, boolean checkLiquibaseTables)
           
 void markNextChangeSetRan(Contexts contexts, LabelExpression labelExpression)
           
 void markNextChangeSetRan(Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void markNextChangeSetRan(String contexts)
           
 void markNextChangeSetRan(String contexts, Writer output)
           
protected  void removeRunStatus(ChangeLogIterator logIterator, Contexts contexts, LabelExpression labelExpression)
           
 void reportLocks(PrintStream out)
           
 void reportStatus(boolean verbose, Contexts contexts, LabelExpression labels, Writer out)
           
 void reportStatus(boolean verbose, Contexts contexts, Writer out)
           
 void reportStatus(boolean verbose, String contexts, Writer out)
           
 void reportUnexpectedChangeSets(boolean verbose, Contexts contexts, LabelExpression labelExpression, Writer out)
           
 void reportUnexpectedChangeSets(boolean verbose, String contexts, Writer out)
           
protected  void resetServices()
           
 void rollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression)
           
 void rollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void rollback(Date dateToRollBackTo, String contexts)
           
 void rollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression)
           
 void rollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void rollback(Date dateToRollBackTo, String rollbackScript, String contexts)
           
 void rollback(Date dateToRollBackTo, String rollbackScript, String contexts, Writer output)
           
 void rollback(Date dateToRollBackTo, String contexts, Writer output)
           
 void rollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression)
           
 void rollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void rollback(int changesToRollback, Contexts contexts, Writer output)
           
 void rollback(int changesToRollback, String contexts)
           
 void rollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression)
           
 void rollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void rollback(int changesToRollback, String rollbackScript, Contexts contexts, Writer output)
           
 void rollback(int changesToRollback, String rollbackScript, String contexts)
           
 void rollback(int changesToRollback, String rollbackScript, String contexts, Writer output)
           
 void rollback(int changesToRollback, String contexts, Writer output)
           
 void rollback(String tagToRollBackTo, Contexts contexts)
           
 void rollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression)
           
 void rollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void rollback(String tagToRollBackTo, Contexts contexts, Writer output)
           
 void rollback(String tagToRollBackTo, String contexts)
           
 void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts)
           
 void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression)
           
 void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, Writer output)
           
 void rollback(String tagToRollBackTo, String rollbackScript, String contexts)
           
 void rollback(String tagToRollBackTo, String rollbackScript, String contexts, Writer output)
           
 void rollback(String tagToRollBackTo, String contexts, Writer output)
           
 void setChangeExecListener(ChangeExecListener listener)
           
 void setChangeLogParameter(String key, Object value)
           
 void setChangeLogSyncListener(ChangeLogSyncListener changeLogSyncListener)
           
 void setCurrentDateTimeFunction(String currentDateTimeFunction)
          Deprecated. Should call Database.setCurrentDateTimeFunction(String) directly
 void setIgnoreClasspathPrefix(boolean ignoreClasspathPrefix)
           
 void tag(String tagString)
          'Tags' the database for future rollback
 boolean tagExists(String tagString)
           
 void update(Contexts contexts)
          Executes Liquibase "update" logic which ensures that the configured Database is up to date according to the configured changelog file.
 void update(Contexts contexts, LabelExpression labelExpression)
           
 void update(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables)
           
 void update(Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void update(Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables)
           
 void update(Contexts contexts, Writer output)
           
 void update(int changesToApply, Contexts contexts, LabelExpression labelExpression)
           
 void update(int changesToApply, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void update(int changesToApply, String contexts)
           
 void update(int changesToApply, String contexts, Writer output)
           
 void update(String contexts)
          Convience method for update(Contexts) that constructs the Context object from the passed string.
 void update(String tag, Contexts contexts)
           
 void update(String tag, Contexts contexts, LabelExpression labelExpression)
           
 void update(String tag, Contexts contexts, LabelExpression labelExpression, Writer output)
           
 void update(String tag, Contexts contexts, Writer output)
           
 void update(String tag, String contexts)
           
 void update(String tag, String contexts, Writer output)
           
 void update(String contexts, Writer output)
           
 void updateTestingRollback(Contexts contexts, LabelExpression labelExpression)
           
 void updateTestingRollback(String contexts)
           
 void updateTestingRollback(String tag, Contexts contexts, LabelExpression labelExpression)
           
 void validate()
          Checks changelogs for bad MD5Sums and preconditions before attempting a migration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

database

protected Database database
Constructor Detail

Liquibase

public Liquibase(String changeLogFile,
                 ResourceAccessor resourceAccessor,
                 DatabaseConnection conn)
          throws LiquibaseException
Creates a Liquibase instance for a given DatabaseConnection. The Database instance used will be found with DatabaseFactory.findCorrectDatabaseImplementation(liquibase.database.DatabaseConnection)

Throws:
LiquibaseException
See Also:
Liquibase(String, liquibase.resource.ResourceAccessor, liquibase.database.Database), ResourceAccessor

Liquibase

public Liquibase(String changeLogFile,
                 ResourceAccessor resourceAccessor,
                 Database database)
          throws LiquibaseException
Creates a Liquibase instance. The changeLogFile parameter must be a path that can be resolved by the passed ResourceAccessor. If windows style path separators are used for the changeLogFile, they will be standardized to unix style for better cross-system compatib.

Throws:
LiquibaseException
See Also:
ResourceAccessor

Liquibase

public Liquibase(DatabaseChangeLog changeLog,
                 ResourceAccessor resourceAccessor,
                 Database database)
Method Detail

getChangeLogFile

public String getChangeLogFile()
Return the change log file used by this Liquibase instance.


getLog

public Logger getLog()
Return the log used by this Liquibase instance.


getChangeLogParameters

public ChangeLogParameters getChangeLogParameters()
Returns the ChangeLogParameters container used by this Liquibase instance.


getDatabase

public Database getDatabase()
Returns the Database used by this Liquibase instance.


getFileOpener

public ResourceAccessor getFileOpener()
Deprecated. use the newer-terminology version getResourceAccessor()

Return ResourceAccessor used by this Liquibase instance.


getResourceAccessor

public ResourceAccessor getResourceAccessor()
Return ResourceAccessor used by this Liquibase instance.


setCurrentDateTimeFunction

public void setCurrentDateTimeFunction(String currentDateTimeFunction)
Deprecated. Should call Database.setCurrentDateTimeFunction(String) directly

Use this function to override the current date/time function used to insert dates into the database. Especially useful when using an unsupported database.


update

public void update(String contexts)
            throws LiquibaseException
Convience method for update(Contexts) that constructs the Context object from the passed string.

Throws:
LiquibaseException

update

public void update(Contexts contexts)
            throws LiquibaseException
Executes Liquibase "update" logic which ensures that the configured Database is up to date according to the configured changelog file. To run in "no context mode", pass a null or empty context object.

Throws:
LiquibaseException

update

public void update(Contexts contexts,
                   LabelExpression labelExpression)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(Contexts contexts,
                   LabelExpression labelExpression,
                   boolean checkLiquibaseTables)
            throws LiquibaseException
Throws:
LiquibaseException

getDatabaseChangeLog

public DatabaseChangeLog getDatabaseChangeLog()
                                       throws LiquibaseException
Throws:
LiquibaseException

createUpdateVisitor

protected UpdateVisitor createUpdateVisitor()

getStandardChangelogIterator

protected ChangeLogIterator getStandardChangelogIterator(Contexts contexts,
                                                         LabelExpression labelExpression,
                                                         DatabaseChangeLog changeLog)
                                                  throws DatabaseException
Throws:
DatabaseException

update

public void update(String contexts,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(Contexts contexts,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(Contexts contexts,
                   LabelExpression labelExpression,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(Contexts contexts,
                   LabelExpression labelExpression,
                   Writer output,
                   boolean checkLiquibaseTables)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(int changesToApply,
                   String contexts)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(int changesToApply,
                   Contexts contexts,
                   LabelExpression labelExpression)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(String tag,
                   String contexts)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(String tag,
                   Contexts contexts)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(String tag,
                   Contexts contexts,
                   LabelExpression labelExpression)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(int changesToApply,
                   String contexts,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(int changesToApply,
                   Contexts contexts,
                   LabelExpression labelExpression,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(String tag,
                   String contexts,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(String tag,
                   Contexts contexts,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

update

public void update(String tag,
                   Contexts contexts,
                   LabelExpression labelExpression,
                   Writer output)
            throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     String contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     Contexts contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     Contexts contexts,
                     LabelExpression labelExpression,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     String rollbackScript,
                     String contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     String rollbackScript,
                     Contexts contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     String rollbackScript,
                     Contexts contexts,
                     LabelExpression labelExpression,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     String contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     Contexts contexts,
                     LabelExpression labelExpression)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     String rollbackScript,
                     String contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(int changesToRollback,
                     String rollbackScript,
                     Contexts contexts,
                     LabelExpression labelExpression)
              throws LiquibaseException
Throws:
LiquibaseException

removeRunStatus

protected void removeRunStatus(ChangeLogIterator logIterator,
                               Contexts contexts,
                               LabelExpression labelExpression)
                        throws LiquibaseException
Throws:
LiquibaseException

executeRollbackScript

protected void executeRollbackScript(String rollbackScript,
                                     Contexts contexts,
                                     LabelExpression labelExpression)
                              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     Contexts contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     Contexts contexts,
                     LabelExpression labelExpression,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String rollbackScript,
                     String contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String rollbackScript,
                     Contexts contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String rollbackScript,
                     Contexts contexts,
                     LabelExpression labelExpression,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     Contexts contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     Contexts contexts,
                     LabelExpression labelExpression)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String rollbackScript,
                     String contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String rollbackScript,
                     Contexts contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(String tagToRollBackTo,
                     String rollbackScript,
                     Contexts contexts,
                     LabelExpression labelExpression)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     String contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     String rollbackScript,
                     String contexts,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     Contexts contexts,
                     LabelExpression labelExpression,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     String rollbackScript,
                     Contexts contexts,
                     LabelExpression labelExpression,
                     Writer output)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     String contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     Contexts contexts,
                     LabelExpression labelExpression)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     String rollbackScript,
                     String contexts)
              throws LiquibaseException
Throws:
LiquibaseException

rollback

public void rollback(Date dateToRollBackTo,
                     String rollbackScript,
                     Contexts contexts,
                     LabelExpression labelExpression)
              throws LiquibaseException
Throws:
LiquibaseException

changeLogSync

public void changeLogSync(String contexts,
                          Writer output)
                   throws LiquibaseException
Throws:
LiquibaseException

changeLogSync

public void changeLogSync(Contexts contexts,
                          LabelExpression labelExpression,
                          Writer output)
                   throws LiquibaseException
Throws:
LiquibaseException

changeLogSync

public void changeLogSync(String contexts)
                   throws LiquibaseException
Throws:
LiquibaseException

changeLogSync

public void changeLogSync(Contexts contexts)
                   throws LiquibaseException
Deprecated. use version with LabelExpression

Throws:
LiquibaseException

changeLogSync

public void changeLogSync(Contexts contexts,
                          LabelExpression labelExpression)
                   throws LiquibaseException
Throws:
LiquibaseException

markNextChangeSetRan

public void markNextChangeSetRan(String contexts,
                                 Writer output)
                          throws LiquibaseException
Throws:
LiquibaseException

markNextChangeSetRan

public void markNextChangeSetRan(Contexts contexts,
                                 LabelExpression labelExpression,
                                 Writer output)
                          throws LiquibaseException
Throws:
LiquibaseException

markNextChangeSetRan

public void markNextChangeSetRan(String contexts)
                          throws LiquibaseException
Throws:
LiquibaseException

markNextChangeSetRan

public void markNextChangeSetRan(Contexts contexts,
                                 LabelExpression labelExpression)
                          throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(String contexts,
                              Writer output)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(Writer output)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(String contexts,
                              Writer output,
                              boolean checkLiquibaseTables)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(Integer count,
                              String contexts,
                              Writer output)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(Contexts contexts,
                              LabelExpression labelExpression,
                              Writer output)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(Integer count,
                              String contexts,
                              Writer output,
                              boolean checkLiquibaseTables)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(Integer count,
                              Contexts contexts,
                              LabelExpression labelExpression,
                              Writer output)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(Integer count,
                              Contexts contexts,
                              LabelExpression labelExpression,
                              Writer output,
                              boolean checkLiquibaseTables)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

public void futureRollbackSQL(String tag,
                              Contexts contexts,
                              LabelExpression labelExpression,
                              Writer output)
                       throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

protected void futureRollbackSQL(Integer count,
                                 String tag,
                                 Contexts contexts,
                                 LabelExpression labelExpression,
                                 Writer output)
                          throws LiquibaseException
Throws:
LiquibaseException

futureRollbackSQL

protected void futureRollbackSQL(Integer count,
                                 String tag,
                                 Contexts contexts,
                                 LabelExpression labelExpression,
                                 Writer output,
                                 boolean checkLiquibaseTables)
                          throws LiquibaseException
Throws:
LiquibaseException

resetServices

protected void resetServices()

dropAll

public final void dropAll()
                   throws DatabaseException,
                          LockException
Drops all database objects in the default schema.

Throws:
DatabaseException
LockException

dropAll

public final void dropAll(CatalogAndSchema... schemas)
                   throws DatabaseException
Drops all database objects in the passed schema(s).

Throws:
DatabaseException

tag

public void tag(String tagString)
         throws LiquibaseException
'Tags' the database for future rollback

Throws:
LiquibaseException

tagExists

public boolean tagExists(String tagString)
                  throws LiquibaseException
Throws:
LiquibaseException

updateTestingRollback

public void updateTestingRollback(String contexts)
                           throws LiquibaseException
Throws:
LiquibaseException

updateTestingRollback

public void updateTestingRollback(Contexts contexts,
                                  LabelExpression labelExpression)
                           throws LiquibaseException
Throws:
LiquibaseException

updateTestingRollback

public void updateTestingRollback(String tag,
                                  Contexts contexts,
                                  LabelExpression labelExpression)
                           throws LiquibaseException
Throws:
LiquibaseException

checkLiquibaseTables

public void checkLiquibaseTables(boolean updateExistingNullChecksums,
                                 DatabaseChangeLog databaseChangeLog,
                                 Contexts contexts,
                                 LabelExpression labelExpression)
                          throws LiquibaseException
Throws:
LiquibaseException

isSafeToRunUpdate

public boolean isSafeToRunUpdate()
                          throws DatabaseException
Returns true if it is "save" to migrate the database. Currently, "safe" is defined as running in an output-sql mode or against a database on localhost. It is fine to run Liquibase against a "non-safe" database, the method is mainly used to determine if the user should be prompted before continuing.

Throws:
DatabaseException

listLocks

public DatabaseChangeLogLock[] listLocks()
                                  throws LiquibaseException
Display change log lock information.

Throws:
LiquibaseException

reportLocks

public void reportLocks(PrintStream out)
                 throws LiquibaseException
Throws:
LiquibaseException

forceReleaseLocks

public void forceReleaseLocks()
                       throws LiquibaseException
Throws:
LiquibaseException

listUnrunChangeSets

public List<ChangeSet> listUnrunChangeSets(Contexts contexts)
                                    throws LiquibaseException
Deprecated. use version with LabelExpression

Throws:
LiquibaseException

listUnrunChangeSets

public List<ChangeSet> listUnrunChangeSets(Contexts contexts,
                                           LabelExpression labels)
                                    throws LiquibaseException
Throws:
LiquibaseException

listUnrunChangeSets

protected List<ChangeSet> listUnrunChangeSets(Contexts contexts,
                                              LabelExpression labels,
                                              boolean checkLiquibaseTables)
                                       throws LiquibaseException
Throws:
LiquibaseException

getChangeSetStatuses

public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts)
                                           throws LiquibaseException
Deprecated. use version with LabelExpression

Throws:
LiquibaseException

getChangeSetStatuses

public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts,
                                                  LabelExpression labelExpression)
                                           throws LiquibaseException
Throws:
LiquibaseException

getChangeSetStatuses

public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts,
                                                  LabelExpression labelExpression,
                                                  boolean checkLiquibaseTables)
                                           throws LiquibaseException
Returns the ChangeSetStatuses of all changesets in the change log file and history in the order they would be ran.

Throws:
LiquibaseException

reportStatus

public void reportStatus(boolean verbose,
                         String contexts,
                         Writer out)
                  throws LiquibaseException
Throws:
LiquibaseException

reportStatus

public void reportStatus(boolean verbose,
                         Contexts contexts,
                         Writer out)
                  throws LiquibaseException
Throws:
LiquibaseException

reportStatus

public void reportStatus(boolean verbose,
                         Contexts contexts,
                         LabelExpression labels,
                         Writer out)
                  throws LiquibaseException
Throws:
LiquibaseException

listUnexpectedChangeSets

public Collection<RanChangeSet> listUnexpectedChangeSets(String contexts)
                                                  throws LiquibaseException
Throws:
LiquibaseException

listUnexpectedChangeSets

public Collection<RanChangeSet> listUnexpectedChangeSets(Contexts contexts,
                                                         LabelExpression labelExpression)
                                                  throws LiquibaseException
Throws:
LiquibaseException

reportUnexpectedChangeSets

public void reportUnexpectedChangeSets(boolean verbose,
                                       String contexts,
                                       Writer out)
                                throws LiquibaseException
Throws:
LiquibaseException

reportUnexpectedChangeSets

public void reportUnexpectedChangeSets(boolean verbose,
                                       Contexts contexts,
                                       LabelExpression labelExpression,
                                       Writer out)
                                throws LiquibaseException
Throws:
LiquibaseException

clearCheckSums

public void clearCheckSums()
                    throws LiquibaseException
Sets checksums to null so they will be repopulated next run

Throws:
LiquibaseException

calculateCheckSum

public final CheckSum calculateCheckSum(String changeSetIdentifier)
                                 throws LiquibaseException
Throws:
LiquibaseException

calculateCheckSum

public CheckSum calculateCheckSum(String filename,
                                  String id,
                                  String author)
                           throws LiquibaseException
Throws:
LiquibaseException

generateDocumentation

public void generateDocumentation(String outputDirectory)
                           throws LiquibaseException
Throws:
LiquibaseException

generateDocumentation

public void generateDocumentation(String outputDirectory,
                                  String contexts)
                           throws LiquibaseException
Throws:
LiquibaseException

generateDocumentation

public void generateDocumentation(String outputDirectory,
                                  Contexts contexts,
                                  LabelExpression labelExpression)
                           throws LiquibaseException
Throws:
LiquibaseException

diff

public DiffResult diff(Database referenceDatabase,
                       Database targetDatabase,
                       CompareControl compareControl)
                throws LiquibaseException
Throws:
LiquibaseException

validate

public void validate()
              throws LiquibaseException
Checks changelogs for bad MD5Sums and preconditions before attempting a migration

Throws:
LiquibaseException

setChangeLogParameter

public void setChangeLogParameter(String key,
                                  Object value)

setChangeExecListener

public void setChangeExecListener(ChangeExecListener listener)

setChangeLogSyncListener

public void setChangeLogSyncListener(ChangeLogSyncListener changeLogSyncListener)

setIgnoreClasspathPrefix

public void setIgnoreClasspathPrefix(boolean ignoreClasspathPrefix)

isIgnoreClasspathPrefix

public boolean isIgnoreClasspathPrefix()

generateChangeLog

public void generateChangeLog(CatalogAndSchema catalogAndSchema,
                              DiffToChangeLog changeLogWriter,
                              PrintStream outputStream,
                              Class<? extends DatabaseObject>... snapshotTypes)
                       throws DatabaseException,
                              IOException,
                              ParserConfigurationException
Throws:
DatabaseException
IOException
ParserConfigurationException

generateChangeLog

public void generateChangeLog(CatalogAndSchema catalogAndSchema,
                              DiffToChangeLog changeLogWriter,
                              PrintStream outputStream,
                              ChangeLogSerializer changeLogSerializer,
                              Class<? extends DatabaseObject>... snapshotTypes)
                       throws DatabaseException,
                              IOException,
                              ParserConfigurationException
Throws:
DatabaseException
IOException
ParserConfigurationException


Copyright © 2015 Liquibase.org. All rights reserved.