I have this project that I ran in Jhipster with the generator yo jhipster:import-jdl. When it ends, everything is clean and ready to start. This is the state I would like to easily return to, in the H2 persistent disk copy, when I do tests, changes and so on, to start all over again.
I guess that using H2 non-persistent memory would create everything every time I start the project, but is there any easy way to get that result in a disk persistent type? (Please confirm)
Or, better, is there a way to tell Jhipter to change from a memory to a persistent database to a memory persistence, at will, before you yarn start the project?
If there is no way to change this at will, I googled for a solution and it looks like I should DROP ALL OBJECTS Reset Embedded H2 database periodically and then I do not know what to do to get to a clean database.
When you use a H2 disk database, the files related to your database is in target/h2db/db/
folder, with *.db
extension.
To get a clean H2 database, you simply need to launch ./mvnw clean
, so it will delete the target folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With