Reset Database to Empty

Hello friends, I'm a bit of a noob so please excuse the question if it has been answered before. I'm trying to find a way to reset the database inside an app to the initial state when an app if first created. Is there a command or procedure one can run/do to have the app recreate an empty database? Thank you,   Jeff G
2 answers

Hi Jeff,

Another option (assuming you're talking about your local development environment) is to delete the "deployment" folder in your project directory. The next time you start the app from the modeler, it will be empty.


Hi Jeffrey,

You can delete your entire database using the mendix model reflection module and the community commons java action delete all.


The java action will delete an entire table using the module name and the table name.

ex: MyFirstModule.Table


The model reflection keep a record of every table that you sync with the module name and table name. So you can retrieve all the model reflection objects and use the delete all java action in an iterator. 

Here is an example. If you copy this link you can import it into your mendix project by pressing ctrl-v.


Also, this will only work if you run the model reflection and have all modules checked when you sync everything. 



Here is the links to the model reflection module and the community commons module


Hope this helps!