playframework / playframework/play-slick
Evolutions file not created when 1.sql exists
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 794
- Forks
- 272
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 17
Description
play-slick only creates an evolutions file for you if you don't have one yet. That's what you want when you first create your model, but doesn't allow you to use this feature when you later change your model and need to create a 2.sql, perhaps with a new table.
Suggestion: instead of generating 1.sql if it isn't there, generate create.sql and drop.sql unless a configuration parameter is set to false. Then you can write your 2.sql based on the diff between 1.sql and create.sql.
I can also imagine situations on a project where you want to run the whole create or drop script on a test database.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the play-slick code that generates 1.sql and the configuration controlling evolution-file creation. Check how an existing 1.sql is detected and where this behavior is covered by tests. Done means the configured behavior produces create.sql and drop.sql without preventing later numbered evolutions, while preserving the disabled option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100