How really works the app updater


I explain my question :

I am currently developing an application with persistent data in a json file

if I publish a new version. will the update tool erase all files, including my persistent file json and even erase all user data?

thank you all

Where are you storing the json file? Generally speaking you should store it somewhere within the data folder.

Furthermore it is best practice to store information in the database.

I understand that, but given the little data stored here, I made that choice. moreover, the owncloud API is very hard to learn and I have not figured out how to use it properly for storage in the database.

finally, on your advice, i've refactored my app and i've learnt how to keep data in the database. But i've an issue when i drop my table to test a manual installation of my app by deleting my app folder and replacing it by a new folder.

When i enable the app the table is not created in database. i've used a database.xml in my appInfo folder.

could you explain me in the main lines the way to allow app to create automatically tables in database after app installation/activation

thank you a lot

Any change to the database is handled via migrations - please follow the docs here