Skip to content

Explain dev settings for generated evolution scripts without Play's layout - #934

Merged
mkurz merged 1 commit into
playframework:mainfrom
mkurz:docs-evolutions-path-dev-settings
Nov 3, 2026
Merged

mkurz merged 1 commit into
playframework:mainfrom
mkurz:docs-evolutions-path-dev-settings

Conversation

@mkurz

@mkurz mkurz commented Oct 13, 2026

Copy link
Copy Markdown
Member

A follow-up of #931, based on this comment by @PromanSEW:

  • In dev mode, PlayKeys.devSettings can point the evolutions to ./src/main/resources/evolutions. Production then keeps the default location and reads the packaged scripts, so it doesn't need the -D override that the docs suggested so far.
  • The tests don't use the dev settings, so the docs say to set the location in the configuration of the test applications as well.
  • Projects that only enable PlayService don't use Play's layout either, and sbt stage/dist don't generate the scripts.

I checked this with an application without Play's layout (Play 3.0.9, Play Ebean 8.5.0): dev mode and the tests write src/main/resources/evolutions/default/1.sql, and the staged application applies it without an override.

Refs #930.

…ayout

In dev mode, PlayKeys.devSettings can point the evolutions to the resources, so production keeps the default location and reads the packaged scripts without an override. The tests need the location in their configuration, as they don't use the dev settings. Also mention PlayService projects, which don't use Play's layout either, and that sbt stage and dist don't generate the scripts.
@mergify

mergify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@mkurz
mkurz merged commit f19dd57 into playframework:main Nov 3, 2026
80 checks passed
@mkurz
mkurz deleted the docs-evolutions-path-dev-settings branch November 3, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant