RFE: Add Flyway.truncate()
See original GitHub issueOriginal author: jonas.ki…@gmail.com (April 14, 2011 19:23:31)
When running junit (integration) tests, one often wants to empty the database upon @Before in order to start the tests with a clean state. It’s doable like this, albeit very time consuming:
flyway.clean();
flyway.init();
flyway.migrate();
Proposal: add flyway.truncate() to just empty the tables instead of re-creating them.
As homework I leave it to you to think about how not to truncate the masterdata insterted as part of flyway.migrate() before, e.g. earlier in the build process where the database was created initally. Because that data is often needed for tests as well and belongs to the database’s base resp. initial setup.
Want do you think? Maybe specifying an exclusion pattern for tables not to truncate would work for 90% of the time?
_Original issue: http://code.google.com/p/flyway/issues/detail?id=122_
Issue Analytics
- State:
- Created 10 years ago
- Reactions:5
- Comments:15
Top GitHub Comments
Same here, +1
Upvote +1