Package play.db.evolutions
Class Evolutions
- Object
-
- play.db.evolutions.Evolutions
-
public class Evolutions extends Object
Utilities for working with evolutions.
-
-
Constructor Summary
Constructors Constructor Description Evolutions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
applyEvolutions(String metaTable, Database database)
Apply evolutions for the given database.static void
applyEvolutions(String metaTable, Database database, boolean autocommit)
Apply evolutions for the given database.static void
applyEvolutions(String metaTable, Database database, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(String metaTable, Database database, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader)
Apply evolutions for the given database.static void
applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit)
Apply evolutions for the given database.static void
applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database)
Apply evolutions for the given database.static void
applyEvolutions(Database database, boolean autocommit)
Apply evolutions for the given database.static void
applyEvolutions(Database database, boolean autocommit, String schema)
Apply evolutions for the given database.static void
applyEvolutions(Database database, boolean autocommit, String schema, String metaTable)
Apply evolutions for the given database.static void
applyEvolutions(Database database, boolean autocommit, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, boolean autocommit, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, String schema)
Apply evolutions for the given database.static void
applyEvolutions(Database database, String schema, String metaTable)
Apply evolutions for the given database.static void
applyEvolutions(Database database, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema, String metaTable)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema, String metaTable)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.static void
cleanupEvolutions(Database database)
Cleanup evolutions for the given database.static void
cleanupEvolutions(Database database, boolean autocommit)
Cleanup evolutions for the given database.static void
cleanupEvolutions(Database database, boolean autocommit, String schema)
Cleanup evolutions for the given database.static void
cleanupEvolutions(Database database, boolean autocommit, String schema, String metaTable)
Cleanup evolutions for the given database.static void
cleanupEvolutions(Database database, boolean autocommit, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Cleanup evolutions for the given database.static void
cleanupEvolutions(Database database, String schema)
Cleanup evolutions for the given database.static void
cleanupEvolutions(Database database, String schema, String metaTable)
Cleanup evolutions for the given database.static void
cleanupEvolutions(Database database, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Cleanup evolutions for the given database.static play.api.db.evolutions.EvolutionsReader
forDefault(Evolution... evolutions)
Create an evolutions reader for the default database from a list of evolutions.static play.api.db.evolutions.EvolutionsReader
fromClassLoader()
Create an evolutions reader that reads evolution files from this class's own classloader.static play.api.db.evolutions.EvolutionsReader
fromClassLoader(ClassLoader classLoader)
Create an evolutions reader that reads evolution files from a classloader.static play.api.db.evolutions.EvolutionsReader
fromClassLoader(ClassLoader classLoader, String prefix)
Create an evolutions reader that reads evolution files from a classloader.static play.api.db.evolutions.EvolutionsReader
fromMap(Map<String,List<Evolution>> evolutions)
Create an evolutions reader based on a simple map of database names to evolutions.
-
-
-
Method Detail
-
fromClassLoader
public static play.api.db.evolutions.EvolutionsReader fromClassLoader()
Create an evolutions reader that reads evolution files from this class's own classloader.Only useful in simple classloading environments, such as when the classloader structure is flat.
- Returns:
- the evolutions reader.
-
fromClassLoader
public static play.api.db.evolutions.EvolutionsReader fromClassLoader(ClassLoader classLoader)
Create an evolutions reader that reads evolution files from a classloader.- Parameters:
classLoader
- The classloader to read from.- Returns:
- the evolutions reader.
-
fromClassLoader
public static play.api.db.evolutions.EvolutionsReader fromClassLoader(ClassLoader classLoader, String prefix)
Create an evolutions reader that reads evolution files from a classloader.- Parameters:
classLoader
- The classloader to read from.prefix
- A prefix that gets added to the resource file names, for example, this could be used to namespace evolutions in different environments to work with different databases.- Returns:
- the evolutions reader.
-
fromMap
public static play.api.db.evolutions.EvolutionsReader fromMap(Map<String,List<Evolution>> evolutions)
Create an evolutions reader based on a simple map of database names to evolutions.- Parameters:
evolutions
- The map of database names to evolutions.- Returns:
- the evolutions reader.
-
forDefault
public static play.api.db.evolutions.EvolutionsReader forDefault(Evolution... evolutions)
Create an evolutions reader for the default database from a list of evolutions.- Parameters:
evolutions
- The list of evolutions.- Returns:
- the evolutions reader.
-
applyEvolutions
public static void applyEvolutions(Database database)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.
-
applyEvolutions
public static void applyEvolutions(Database database, boolean autocommit)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.
-
applyEvolutions
public static void applyEvolutions(Database database, String schema)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.schema
- The schema where all the play evolution tables are saved in
-
applyEvolutions
public static void applyEvolutions(Database database, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.
-
applyEvolutions
public static void applyEvolutions(Database database, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.schema
- The schema that all the play evolution tables are saved insubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(Database database, String schema, String metaTable)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.schema
- The schema where all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta data
-
applyEvolutions
public static void applyEvolutions(Database database, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.schema
- The schema that all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta datasubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database, boolean autocommit)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.
-
applyEvolutions
public static void applyEvolutions(Database database, boolean autocommit, String schema)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.schema
- The schema that all the play evolution tables are saved in
-
applyEvolutions
public static void applyEvolutions(Database database, boolean autocommit, String schema, String metaTable)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.schema
- The schema that all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta data
-
applyEvolutions
public static void applyEvolutions(Database database, boolean autocommit, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.schema
- The schema that all the play evolution tables are saved insubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(Database database, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(Database database, boolean autocommit, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.schema
- The schema that all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta datasubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.schema
- The schema where all the play evolution tables are saved in
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.reader
- The reader to read the evolutions.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.schema
- The schema that all the play evolution tables are saved insubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.reader
- The reader to read the evolutions.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema, String metaTable)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.schema
- The schema where all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta data
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.schema
- The schema that all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta datasubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.schema
- The schema where all the play evolution tables are saved in
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema, String metaTable)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.schema
- The schema where all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta data
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.schema
- The schema that all the play evolution tables are saved insubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(String metaTable, Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
metaTable
- Table to keep evolutions' meta datadatabase
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.substitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
applyEvolutions
public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Apply evolutions for the given database.- Parameters:
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.schema
- The schema that all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta datasubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
cleanupEvolutions
public static void cleanupEvolutions(Database database, boolean autocommit, String schema)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.schema
- The schema where all the play evolution tables are saved in
-
cleanupEvolutions
public static void cleanupEvolutions(Database database, boolean autocommit, String schema, String metaTable)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.schema
- The schema where all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta data
-
cleanupEvolutions
public static void cleanupEvolutions(Database database, boolean autocommit, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.schema
- The schema that all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta datasubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
cleanupEvolutions
public static void cleanupEvolutions(Database database, boolean autocommit)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.
-
cleanupEvolutions
public static void cleanupEvolutions(Database database, String schema)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.schema
- The schema where all the play evolution tables are saved in
-
cleanupEvolutions
public static void cleanupEvolutions(Database database, String schema, String metaTable)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.schema
- The schema where all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta data
-
cleanupEvolutions
public static void cleanupEvolutions(Database database, String schema, String metaTable, Map<String,String> substitutionsMappings, String substitutionsPrefix, String substitutionsSuffix, boolean substitutionsEscape)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.schema
- The schema that all the play evolution tables are saved inmetaTable
- Table to keep evolutions' meta datasubstitutionsMappings
- Mappings of variables (without the prefix and suffix) and their replacements.substitutionsPrefix
- Prefix of the variable to substitute, e.g. "$evolutions{{{".substitutionsSuffix
- Suffix of the variable to substitute, e.g. "}}}".substitutionsEscape
- Whetever escaping of variables is enabled via a preceding "!". E.g. "!$evolutions{{{my_variable}}}" ends up as "$evolutions{{{my_variable}}}" in the final sql instead of replacing it with its substitution.
-
cleanupEvolutions
public static void cleanupEvolutions(Database database)
Cleanup evolutions for the given database.This will run the down scripts for all the applied evolutions.
- Parameters:
database
- The database to apply the evolutions to.
-
-