This question might seem stupid, but I cannot find any instruction on how to roll back an evolution in Play 2.0. Google only finds pages which say that the "Downs" section of an evolution file is used for that and that's all. Any pointers or instructions will be appreciated.
Rolling an evolution back
5.2k Views Asked by noncom At
2
There are 2 best solutions below
0
Andrey
On
For play 2.4.x, according to the play documentation, you just need to call Evolutions.cleanupEvolutions(database) after the test. See here https://www.playframework.com/documentation/2.4.x/ScalaTestingWithDatabases
Related Questions in PLAYFRAMEWORK-2.0
- Scala play dependency issue
- Special character in key in the conf file for Internationlization in play framework
- Play evolutions not updating the status to applied
- Type mismatch in recursive function using Bitbucket API and Playframework
- Access to dynamic Images with vue and playframework
- JsLookup on multiple level array using play Json library (or any other suggestion)
- Unable to display images from local inventory in Play 2 framework using Scala
- Play Framework - Respond with JSON after uploading a file (multipartFormData)
- Play Framework 2.8.8 with AWS Java SDK 1.12.6 (com.fasterxml.jackson.databind.JsonMappingException)
- PlayFramework - what is the alternative to response.getBodyAsStream()?
- Elasticsearch Java-Play Framework - in query BoolQueryBuilder to write a query
- Using MockitoSugar of scalatestplus-play deprecated
- IntelliJ always runs entire ScalaTest suite 17 times
- How use Play Framework 2.8 WebSocket with Sink and Source?
- How to get body from a request?
Related Questions in REVERT
- Uniswap V3 Bot on Sepolia Testenet
- Visual Studio 2022 - Web.config is reverting back when building the solution
- Why does my solidity function jump to other unrelated functions in the contract?
- Unmerge in GIT with 3 branches
- How to revert wrong setting of path variable LD_LIBRARY_PATH
- reverting back to an older version of a saved excel 2013 file
- Attack function reverting.. Why?
- How to prevent old git revert showing up in each branch
- Git: revert a merge commit: already up to date
- How to revert thousands of pending changes after losing files due to terminal mistakes
- Revert of Filepond is not working on Live server but works on local Server while using laravel
- GIT/DIFF - Reverse patch between a moved local file and an old commit
- Revert some file/directory deletions from other Revert, Recover file and directory from Commit
- Accidently pulled code from repository and now the code I was working on is gone. Can I revert it back?
- Equal opeartor not working with Array in Solidty
Related Questions in PLAYFRAMEWORK-EVOLUTIONS
- Play evolutions not updating the status to applied
- Play framework evolution script error line number
- Why is play framework not running my evolutions?
- How do you delete an evolution in Play?
- Database 'default' is in an inconsistent state
- How to load Evolutions script (database migration scripts) from external folder or external jar?
- Need to supply DB password to run evolutions at run time - Play + Slick
- How one should handle incremental database schema evolution
- Play + Slick + Evolutions Testing Advice
- With Play framework what am I doing wrong in setting up my routers
- Play evolution not applied in custom Slick environment configuration
- Play 2.6 evolutions DB change not applied
- Conditional Scala Play Evolutions
- Play Framework evolutions error
- How to disable evolutions in play
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The Downs part is mainly used to revert an Evolution when the script has changed. That is, you have a project with 2.sql applied to the database and then, due to a merge, 2.sql is modified in the source. Play will run Downs on the old version and then Ups on the new 2.sql to ensure the database is in sync with the codebase.
As far as I know there is no way to trigger Downs by itself, as the purpose of an Evolution is to prepare the database to work with your code, and applying just one Downs step would leave the application in an inconsistent state with many potential errors arising.
If you really need to revert something, that would be a new Evolution (3.sql) where Ups would do the changes required.