Evolutions
Defines Evolutions utilities functions.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Evolutions.type
Members list
Value members
Concrete methods
Apply evolutions for the given database.
Apply evolutions for the given database.
Value parameters
- autocommit
-
Whether to use autocommit or not, evolutions will be manually committed if false.
- database
-
The database to apply the evolutions to.
- evolutionsReader
-
The reader to read the evolutions.
- metaTable
-
Table to keep evolutions' meta data
- schema
-
The schema that all the play evolution tables are saved in
- 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.
- substitutionsMappings
-
Mappings of variables (without the prefix and suffix) and their replacements.
- substitutionsPrefix
-
Prefix of the variable to substitute, e.g. "$evolutions
". @param substitutionsSuffix Suffix of the variable to substitute, e.g. "
".
Attributes
Cleanup evolutions for the given database.
Cleanup evolutions for the given database.
This will leave the database in the original state it was before evolutions were applied, by running the down scripts for all the evolutions that have been previously applied to the database.
Value parameters
- autocommit
-
Whether to use autocommit or not, evolutions will be manually committed if false.
- database
-
The database to clean the evolutions for.
- metaTable
-
Table to keep evolutions' meta data
- schema
-
The schema where all the play evolution tables are saved in
- 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.
- substitutionsMappings
-
Mappings of variables (without the prefix and suffix) and their replacements.
- substitutionsPrefix
-
Prefix of the variable to substitute, e.g. "$evolutions
". @param substitutionsSuffix Suffix of the variable to substitute, e.g. "
".
Attributes
Compare two evolution sequences.
Compare two evolution sequences.
Value parameters
- downs
-
the seq of downs
- ups
-
the seq of ups
Attributes
- Returns
-
the downs and ups to run to have the db synced to the current stage
Default evolutions directory location.
Default evolutions directory location.
Attributes
Default evolution file location.
Default evolution file location.
Attributes
Default evolution resource name.
Default evolution resource name.
Attributes
Translates evolution scripts into something human-readable.
Translates evolution scripts into something human-readable.
Value parameters
- scripts
-
the evolution scripts
Attributes
- Returns
-
a formatted script
Updates a local (file-based) evolution script.
Updates a local (file-based) evolution script.
Attributes
Execute the following code block with the evolutions for the database, cleaning up afterwards by running the downs.
Execute the following code block with the evolutions for the database, cleaning up afterwards by running the downs.
Value parameters
- autocommit
-
Whether to use autocommit or not, evolutions will be manually committed if false.
- block
-
The block to execute
- database
-
The database to execute the evolutions on
- evolutionsReader
-
The evolutions reader to use. Defaults to reading evolutions from the evolution readers own classloader.
- metaTable
-
Table to keep evolutions' meta data
- schema
-
The schema where all the play evolution tables are saved in
- 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.
- substitutionsMappings
-
Mappings of variables (without the prefix and suffix) and their replacements.
- substitutionsPrefix
-
Prefix of the variable to substitute, e.g. "$evolutions
". @param substitutionsSuffix Suffix of the variable to substitute, e.g. "
".