Sample Header Ad - 728x90

Is there any way to clear all tables using Liquibase?

2 votes
1 answer
17510 views
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?
Asked by gilaras (123 rep)
Apr 3, 2012, 06:36 AM
Last activity: Sep 26, 2023, 03:45 PM