EvolutionsApi

play.api.db.evolutions.EvolutionsApi

Evolutions API.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def evolve(db: String, scripts: Seq[Script], autocommit: Boolean, schema: String): Unit

Apply evolution scripts to the database.

Apply evolution scripts to the database.

Value parameters

autocommit

determines whether the connection uses autocommit

db

the database name

schema

The schema where all the play evolution tables are saved in

scripts

the evolution scripts to run

Attributes

def evolve(db: String, scripts: Seq[Script], autocommit: Boolean, schema: String, metaTable: String): Unit

Apply evolution scripts to the database.

Apply evolution scripts to the database.

Value parameters

autocommit

determines whether the connection uses autocommit

db

the database name

metaTable

Table to keep evolutions' data

schema

The schema where all the play evolution tables are saved in

scripts

the evolution scripts to run

Attributes

def evolve(db: String, scripts: Seq[Script], autocommit: Boolean, schema: String, metaTable: String, substitutionsMappings: Map[String, String], substitutionsPrefix: String, substitutionsSuffix: String, substitutionsEscape: Boolean): Unit

Apply evolution scripts to the database.

Apply evolution scripts to the database.

Value parameters

autocommit

determines whether the connection uses autocommit

db

the database name

metaTable

Table to keep evolutions' data

schema

The schema where all the play evolution tables are saved in

scripts

the evolution scripts to run

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

def resetScripts(db: String, schema: String): Seq[Script]

Get all scripts necessary to reset the database state to its initial state.

Get all scripts necessary to reset the database state to its initial state.

Value parameters

db

the database name

schema

The schema where all the play evolution tables are saved in

Attributes

Returns

evolution scripts

def resetScripts(db: String, schema: String, metaTable: String): Seq[Script]

Get all scripts necessary to reset the database state to its initial state.

Get all scripts necessary to reset the database state to its initial state.

Value parameters

db

the database name

metaTable

Table to keep evolutions' data

schema

The schema where all the play evolution tables are saved in

Attributes

Returns

evolution scripts

def resolve(db: String, revision: Int, schema: String): Unit

Resolve evolution conflicts.

Resolve evolution conflicts.

Value parameters

db

the database name

revision

the revision to mark as resolved

schema

The schema where all the play evolution tables are saved in

Attributes

def resolve(db: String, revision: Int, schema: String, metaTable: String): Unit

Resolve evolution conflicts.

Resolve evolution conflicts.

Value parameters

db

the database name

metaTable

Table to keep evolutions' meta data

revision

the revision to mark as resolved

schema

The schema where all the play evolution tables are saved in

Attributes

def scripts(db: String, evolutions: Seq[Evolution], schema: String): Seq[Script]

Create evolution scripts.

Create evolution scripts.

Value parameters

db

the database name

evolutions

the evolutions for the application

schema

The schema where all the play evolution tables are saved in

Attributes

Returns

evolution scripts

def scripts(db: String, evolutions: Seq[Evolution], schema: String, metaTable: String): Seq[Script]

Create evolution scripts.

Create evolution scripts.

Value parameters

db

the database name

evolutions

the evolutions for the application

metaTable

Table to keep evolutions' meta data

schema

The schema where all the play evolution tables are saved in

Attributes

Returns

evolution scripts

def scripts(db: String, reader: EvolutionsReader, schema: String): Seq[Script]

Create evolution scripts.

Create evolution scripts.

Value parameters

db

the database name

reader

evolution file reader

schema

The schema where all the play evolution tables are saved in

Attributes

Returns

evolution scripts

def scripts(db: String, reader: EvolutionsReader, schema: String, metaTable: String): Seq[Script]

Create evolution scripts.

Create evolution scripts.

Value parameters

db

the database name

metaTable

Table to keep evolutions' meta data

reader

evolution file reader

schema

The schema where all the play evolution tables are saved in

Attributes

Returns

evolution scripts

Concrete methods

def applyFor(dbName: String, path: File, autocommit: Boolean, schema: String, metaTable: String, substitutionsMappings: Map[String, String], substitutionsPrefix: String, substitutionsSuffix: String, substitutionsEscape: Boolean, evolutionsPath: String): Unit

Apply pending evolutions for the given database.

Apply pending evolutions for the given database.

Attributes