Delete database content in published app

0
Hi all   Is there a way to delete all entries of the built in database in a published app? At the moment, each time I publish my app I still have the old data in it and I want to set it up fresh with nothing in it. Deleting the deployment folder doesn’t work here since it’s not for a local app if I’m not wrong.   Thanks
asked
1 answers
0

Simplest way is to rename your database via Project ‘yourproject’ → Settings → tab Configuration → tab Database → Database name. Now press F5 and you will get a popup

That will of course be empty.

Another way, if you have your project set on database type “Built-in database”, is indeed to clean your project’s directory ‘deployment’. Or more precise: deployment\data\database\hsql\<yourdatabasename>. Have a look at Mendix’ behavior there. Always nice to have a grasp of Mendix’s inner workings.

These both require manual deletion. If you want this as an automated step, your will probably have to built your own progress script to take care of cleaning data upon start, or you can create a after-startup routine in your app that checks if your app is running locally, and if so remove the data that you need to have removed.

answered