work.play-jdbc-evolutions_2.13.3.0.5.source-code.reference.conf Maven / Gradle / Ivy
# Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
play {
modules {
enabled += "play.api.db.evolutions.EvolutionsModule"
}
# Evolutions configuration
evolutions {
# Whether evolutions are enabled
enabled = true
# Database schema in which the generated evolution and lock tables will be saved to
schema = ""
# Table in which to store the evolutions' meta data
metaTable = "play_evolutions"
# Whether evolution updates should be performed with autocommit or in a manually managed transaction
autocommit = true
# Whether locks should be used when apply evolutions. If this is true, a locks table will be created, and will
# be used to synchronise between multiple Play instances trying to apply evolutions. Set this to true in a multi
# node environment.
useLocks = false
# Whether evolutions should be automatically applied. In prod mode, this will only apply ups, in dev mode, it will
# cause both ups and downs to be automatically applied.
autoApply = false
# Whether downs should be automatically applied. This must be used in combination with autoApply, and only applies
# to prod mode.
autoApplyDowns = false
# Whether evolutions should be skipped, if the scripts are all down.
skipApplyDownsOnly = false
# Path to the location where evolution scripts are stored. By default this is conf/evolutions/{database name}.
# Supported paths are:
# - Simple names to keep the files within the conf folder:
# E.g. "db_migration" for conf/db_migration/{database name}
# - Absolute paths:
# E.g. "/opt/db_migration" for /opt/db_migration/{database name}
# - Relative paths (as seen from the project's root folder):
# E.g. "../db_migration" for /../db_migration/{database name}
# - Paths to keep the files within the project but outside the conf folder:
# E.g. "./db_migration"
# Be aware that in this case to make sure the folder gets packaged and is available in production
# you have to set that up in your build.sbt:
# ---
# Universal / mappings ++= (baseDirectory.value / "db_migration" ** "*").get.map {
# (f: File) => f -> f.relativeTo(baseDirectory.value).get.toString
# }
# ---
path = "evolutions"
# Variable substitution configuration
substitutions {
# Prefix of the variable to substitute.
prefix = "$evolutions{{{"
# Suffix of the variable to substitute.
suffix = "}}}"
# If enabled, the syntax "!$evolutions{{{...}}}" can be used to escape variable substitution. E.g. "!$evolutions{{{my_variable}}}"
# will not be replaced with its substitution but instead will become "$evolutions{{{my_variable}}}}" in the final sql.
# Be aware: This escape mechanism will be applied to all "!$evolutions{{{...}}}" placeholders, no matter if a mapping for
# a variable is defined in the "mappings" config or not.
escapeEnabled = true
# Mappings of variables (without the prefix and suffix) with their replacements.
mappings = {
# my_variable = "some_value"
}
}
# Db specific configuration. Should be a map of db names to configuration in the same format as this.
db {
}
}
}