I'm currently using Liquibase for creating test data in my database before each test run.
I came across a problem where some of the test cases need special data, while others need the tables to be empty.
So I decided to give Liquibase contexts a try and only insert the data I really need for the current testcase plus - in an abstract superclass - all the data every test case needs (user accounts and stuff)...
I would like to clear the tables before each run, however I can't seem to find anything for this case except dropAll()
, which seems to be overkill...
I'm not quite sure if it is even possible - because of foreign keys and other constraints - but I wonder if there is a way to delete the content of ALL the tables without dropping them completely?