public class Evolutions
extends java.lang.Object
Constructor and Description |
---|
Evolutions() |
Modifier and Type | Method and Description |
---|---|
static void |
applyEvolutions(Database database)
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 |
cleanupEvolutions(Database database)
Cleanup evolutions for the given database.
|
static void |
cleanupEvolutions(Database database,
boolean autocommit)
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 classes own classloader.
|
static play.api.db.evolutions.EvolutionsReader |
fromClassLoader(java.lang.ClassLoader classLoader)
Create an evolutions reader that reads evolution files from a classloader.
|
static play.api.db.evolutions.EvolutionsReader |
fromClassLoader(java.lang.ClassLoader classLoader,
java.lang.String prefix)
Create an evolutions reader that reads evolution files from a classloader.
|
static play.api.db.evolutions.EvolutionsReader |
fromMap(java.util.Map<java.lang.String,java.util.List<Evolution>> evolutions)
Create an evolutions reader based on a simple map of database names to evolutions.
|
public static play.api.db.evolutions.EvolutionsReader fromClassLoader()
public static play.api.db.evolutions.EvolutionsReader fromClassLoader(java.lang.ClassLoader classLoader)
classLoader
- The classloader to read from.public static play.api.db.evolutions.EvolutionsReader fromClassLoader(java.lang.ClassLoader classLoader, java.lang.String prefix)
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.public static play.api.db.evolutions.EvolutionsReader fromMap(java.util.Map<java.lang.String,java.util.List<Evolution>> evolutions)
evolutions
- The map of database names to evolutions.public static play.api.db.evolutions.EvolutionsReader forDefault(Evolution... evolutions)
evolutions
- The list of evolutions.public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader, boolean autocommit)
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.autocommit
- Whether autocommit should be used.public static void applyEvolutions(Database database, play.api.db.evolutions.EvolutionsReader reader)
database
- The database to apply the evolutions to.reader
- The reader to read the evolutions.public static void applyEvolutions(Database database)
database
- The database to apply the evolutions to.public static void cleanupEvolutions(Database database, boolean autocommit)
database
- The database to apply the evolutions to.autocommit
- Whether autocommit should be used.public static void cleanupEvolutions(Database database)
database
- The database to apply the evolutions to.