public class LiquibaseHelper extends Object
| Constructor and Description |
|---|
LiquibaseHelper(Map<String,String> props)
Creates a new helper.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateMigrations() |
static String |
getAuthor(String userName)
Returns the migration author name.
|
String |
getChangeLogResourceName() |
protected Connection |
getConnection(String url,
String username,
String password)
Returns a database connection.
|
protected liquibase.database.Database |
getLiquibaseDatabase(Connection conn) |
liquibase.database.Database |
getReferenceDatabase()
Returns the "reference" database.
|
File |
getResourcesDir() |
static boolean |
isIgnoredChangeSet(liquibase.changelog.ChangeSet changeSet)
Returns true if the change set should be ignored.
|
void |
migrate()
Helper utility to perform a Liquibase database migration.
|
static void |
removeObjectQuotingStrategy(File changeLogFile)
Removes all "objectQuotingStrategy" attributes.
|
public File getResourcesDir()
public String getChangeLogResourceName()
public void migrate()
throws liquibase.exception.LiquibaseException,
SQLException
liquibase.exception.LiquibaseExceptionSQLExceptionLiquibase.update(String)public void generateMigrations()
throws IOException,
liquibase.exception.LiquibaseException,
SQLException
IOExceptionliquibase.exception.LiquibaseExceptionSQLExceptionprotected Connection getConnection(String url, String username, String password) throws SQLException
url - username - password - SQLExceptionprotected liquibase.database.Database getLiquibaseDatabase(Connection conn) throws liquibase.exception.DatabaseException
liquibase.exception.DatabaseExceptionpublic liquibase.database.Database getReferenceDatabase()
throws liquibase.exception.DatabaseException,
SQLException
liquibase.exception.DatabaseExceptionSQLExceptionpublic static String getAuthor(String userName)
userName - The current user name.public static boolean isIgnoredChangeSet(liquibase.changelog.ChangeSet changeSet)
changeSet - The candidate change set.public static void removeObjectQuotingStrategy(File changeLogFile) throws IOException
changeLogFile - The changelog file.IOExceptionCopyright © 2017 Ajibot. All rights reserved.