play.api.db.evolutions

Members list

Type members

Classlikes

@Singleton
class ApplicationEvolutions(config: EvolutionsConfig, reader: EvolutionsReader, evolutions: EvolutionsApi, dynamicEvolutions: DynamicEvolutions, dbApi: DBApi, environment: Environment, webCommands: WebCommands)

Run evolutions on application startup. Automatically runs on construction.

Run evolutions on application startup. Automatically runs on construction.

Attributes

Supertypes
class Object
trait Matchable
class Any
@Singleton
class ApplicationEvolutionsProvider(config: EvolutionsConfig, reader: EvolutionsReader, evolutions: EvolutionsApi, dbApi: DBApi, environment: Environment, webCommands: WebCommands, injector: Injector) extends Provider[ApplicationEvolutions]

Attributes

Supertypes
trait Provider[ApplicationEvolutions]
class Object
trait Matchable
class Any
class ClassLoaderEvolutionsReader(classLoader: ClassLoader, prefix: String) extends ResourceEvolutionsReader

Evolutions reader that reads evolution files from a class loader.

Evolutions reader that reads evolution files from a class loader.

Value parameters

classLoader

The classloader to read from, defaults to the classloader for this class.

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.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Evolutions reader that reads evolution files from a class loader.

Evolutions reader that reads evolution files from a class loader.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class DatabaseEvolutions(database: Database, schema: String, metaTable: String, substitutionsMappings: Map[String, String], substitutionsPrefix: String, substitutionsSuffix: String, substitutionsEscape: Boolean)

Evolutions for a particular database.

Evolutions for a particular database.

Attributes

Supertypes
class Object
trait Matchable
class Any
@Singleton
class DefaultEvolutionsApi(dbApi: DBApi) extends EvolutionsApi

Default implementation of the evolutions API.

Default implementation of the evolutions API.

Attributes

Supertypes
class Object
trait Matchable
class Any

Default evolutions configuration.

Default evolutions configuration.

Attributes

Supertypes
class Object
trait Matchable
class Any
@Singleton
class DefaultEvolutionsConfigParser(rootConfig: Configuration) extends Provider[EvolutionsConfig]

A provider that creates an EvolutionsConfig from the play.api.Configuration.

A provider that creates an EvolutionsConfig from the play.api.Configuration.

Attributes

Supertypes
trait Provider[EvolutionsConfig]
class Object
trait Matchable
class Any
case class DefaultEvolutionsDatasourceConfig(enabled: Boolean, schema: String, metaTable: String, autocommit: Boolean, useLocks: Boolean, autoApply: Boolean, autoApplyDowns: Boolean, skipApplyDownsOnly: Boolean, substitutionsPrefix: String, substitutionsSuffix: String, substitutionsMappings: Map[String, String], substitutionsEscape: Boolean, path: String) extends EvolutionsDatasourceConfig

Default evolutions datasource configuration.

Default evolutions datasource configuration.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class DownScript(evolution: Evolution) extends Script

A DOWN Script to run on the database.

A DOWN Script to run on the database.

Value parameters

evolution

the original evolution

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Script
class Object
trait Matchable
class Any
Show all
@Singleton

Default implementation for optional dynamic evolutions.

Default implementation for optional dynamic evolutions.

Attributes

Supertypes
class Object
trait Matchable
class Any
@Singleton
class EnvironmentEvolutionsReader(environment: Environment, evolutionsConfig: EvolutionsConfig) extends ResourceEvolutionsReader

Read evolution files from the application environment.

Read evolution files from the application environment.

Attributes

Supertypes
class Object
trait Matchable
class Any
case class Evolution(revision: Int, sql_up: String, sql_down: String)

An SQL evolution - database changes associated with a software version.

An SQL evolution - database changes associated with a software version.

An evolution includes ‘up’ changes, to upgrade to the next version, as well as ‘down’ changes, to downgrade the database to the previous version.

Value parameters

revision

revision number

sql_down

the SQL statements for DOWN application

sql_up

the SQL statements for UP application

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Evolutions

Defines Evolutions utilities functions.

Defines Evolutions utilities functions.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Evolutions.type

Evolutions API.

Evolutions API.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Components for default implementation of the evolutions API.

Components for default implementation of the evolutions API.

Attributes

Supertypes
class Object
trait Matchable
class Any

Evolutions configuration for all datasources.

Evolutions configuration for all datasources.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Evolutions configuration for a given datasource.

Evolutions configuration for a given datasource.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Default module for evolutions API.

Default module for evolutions API.

Attributes

Supertypes
class SimpleModule
class Module
class Object
trait Matchable
class Any

Reader for evolutions

Reader for evolutions

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
@Singleton

Web command handler for applying evolutions on application start.

Web command handler for applying evolutions on application start.

Attributes

Supertypes
class Object
trait Matchable
class Any
case class InconsistentDatabase(db: String, script: String, error: String, rev: Int, autocommit: Boolean) extends RichDescription

Exception thrown when the database is in an inconsistent state.

Exception thrown when the database is in an inconsistent state.

Value parameters

db

the database name

error

an inconsistent state error

rev

the revision

script

the evolution script

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class InvalidDatabaseRevision(db: String, script: String) extends RichDescription

Exception thrown when the database is not up to date.

Exception thrown when the database is not up to date.

Value parameters

db

the database name

script

the script to be run to resolve the conflict.

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Can be used to run off-line evolutions, i.e. outside a running application.

Can be used to run off-line evolutions, i.e. outside a running application.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Evolutions reader that reads evolutions from resources, for example, the file system or the classpath

Evolutions reader that reads evolutions from resources, for example, the file system or the classpath

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Script

A Script to run on the database.

A Script to run on the database.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DownScript
class UpScript
class SimpleEvolutionsReader(evolutionsMap: Map[String, Seq[Evolution]]) extends EvolutionsReader

Simple map based implementation of the evolutions reader.

Simple map based implementation of the evolutions reader.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Simple map based implementation of the evolutions reader.

Simple map based implementation of the evolutions reader.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Evolutions reader that reads evolution files from its own classloader. Only suitable for simple (flat) classloading environments.

Evolutions reader that reads evolution files from its own classloader. Only suitable for simple (flat) classloading environments.

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Self type
case class UpScript(evolution: Evolution) extends Script

An UP Script to run on the database.

An UP Script to run on the database.

Value parameters

evolution

the original evolution

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Script
class Object
trait Matchable
class Any
Show all