public class MigrationConfig extends Object
| Constructor and Description |
|---|
MigrationConfig() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
createConnection()
Create a Connection to the database using the configured driver, url, username etc.
|
String |
getApplySuffix()
Return the suffix for migration resources (defaults to .sql).
|
ClassLoader |
getClassLoader()
Return the ClassLoader to use to load resources.
|
String |
getDbDriver()
Return the DB Driver.
|
String |
getDbPassword()
Return the DB password.
|
String |
getDbUrl()
Return the DB connection URL.
|
String |
getDbUsername()
Return the DB username.
|
String |
getMetaTable()
Return the name of the migration table.
|
String |
getMigrationPath()
Return the root path used to find migrations.
|
Map<String,String> |
getRunPlaceholderMap()
Return a map of name/value pairs that can be expressions replaced in migration scripts.
|
String |
getRunPlaceholders()
Return a Comma and equals delimited key/value placeholders to replace in DDL scripts.
|
void |
load(Properties props)
Load configuration from standard properties.
|
void |
setApplySuffix(String applySuffix)
Set the suffix for migration resources.
|
void |
setClassLoader(ClassLoader classLoader)
Set the ClassLoader to use when loading resources.
|
void |
setDbDriver(String dbDriver)
Set the DB Driver.
|
void |
setDbPassword(String dbPassword)
Set the DB password.
|
void |
setDbUrl(String dbUrl)
Set the DB connection URL.
|
void |
setDbUsername(String dbUsername)
Set the DB username.
|
void |
setMetaTable(String metaTable)
Set the name of the migration table.
|
void |
setMigrationPath(String migrationPath)
Set the root path used to find migrations.
|
void |
setRunPlaceholderMap(Map<String,String> runPlaceholderMap)
Set a map of name/value pairs that can be expressions replaced in migration scripts.
|
void |
setRunPlaceholders(String runPlaceholders)
Set a Comma and equals delimited key/value placeholders to replace in DDL scripts.
|
public MigrationConfig()
public String getMetaTable()
public void setMetaTable(String metaTable)
public String getRunPlaceholders()
public void setRunPlaceholders(String runPlaceholders)
public Map<String,String> getRunPlaceholderMap()
public void setRunPlaceholderMap(Map<String,String> runPlaceholderMap)
public String getMigrationPath()
public void setMigrationPath(String migrationPath)
public String getApplySuffix()
public void setApplySuffix(String applySuffix)
public String getDbUsername()
Used when a Connection to run the migration is not supplied.
public void setDbUsername(String dbUsername)
Used when a Connection to run the migration is not supplied.
public String getDbPassword()
Used when creating a Connection to run the migration.
public void setDbPassword(String dbPassword)
Used when creating a Connection to run the migration.
public String getDbDriver()
Used when creating a Connection to run the migration.
public void setDbDriver(String dbDriver)
Used when creating a Connection to run the migration.
public String getDbUrl()
Used when creating a Connection to run the migration.
public void setDbUrl(String dbUrl)
Used when creating a Connection to run the migration.
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public void load(Properties props)
public Connection createConnection()
Used when an existing DataSource or Connection is not supplied.
Copyright © 2016. All rights reserved.