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 |
getDbSchema()
Return the DB connection Schema.
|
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.
|
String |
getPlatformName()
Return the DB platform name (used for platform create table and select for update syntax).
|
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.
|
boolean |
isCreateSchemaIfNotExists()
Return true if migration should create the schema if it does not exist.
|
boolean |
isSkipChecksum()
Return true if checksum check should be skipped (during development).
|
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 |
setCreateSchemaIfNotExists(boolean createSchemaIfNotExists)
Set to create Schema if it does not exist.
|
void |
setDbDriver(String dbDriver)
Set the DB Driver.
|
void |
setDbPassword(String dbPassword)
Set the DB password.
|
void |
setDbSchema(String dbSchema)
Set the DB connection Schema.
|
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 |
setPlatformName(String platformName)
Set a DB platform name (to load specific create table and select for update syntax).
|
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.
|
void |
setSkipChecksum(boolean skipChecksum)
Set to true to skip the checksum check.
|
public MigrationConfig()
public String getMetaTable()
public void setMetaTable(String metaTable)
public boolean isSkipChecksum()
public void setSkipChecksum(boolean skipChecksum)
This is intended for use during development only.
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 String getDbSchema()
Used when creating a Connection to run the migration.
public void setDbSchema(String dbSchema)
Used when creating a Connection to run the migration.
public boolean isCreateSchemaIfNotExists()
public void setCreateSchemaIfNotExists(boolean createSchemaIfNotExists)
public String getPlatformName()
public void setPlatformName(String platformName)
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 © 2017. All rights reserved.