Modeler scripting SQLite changes

Hello

I'm planning to create an App for iOS and Android that work with SQLite.

However when I release new features to the App it might need some changes to the SQLite DB that was released on the first version.

I asumme data modeler will help me in the way that if DB changes in tables and fields I can obtain scritps between versions right?

However I want to ask you If I release 4 versions of my App, and each of them contains files like: 2.txt, 3.txt and 4.txt, when my user upgrade his first release 1.0 from Appstore or playstore the initial SQLite database with version 1.0 will not be modified with the next versions?

Example:

  1. One user download the App version 1.0 containing SQLite DB version 1.0
  2. Next Month the same user upgrade the App trought PlayStore and the next release was the App version 2.0 containing SQLite version 2.0, does PlayStore will update only the APK only or it will replace the SQLite DB version 1.0 with the SQLite version 2.0?

If my user entered several records to his SQLite version 1.0 I do not want the PlayStore upgrade process replace his entire SQLite database with the new empty released on the version 2.0

Does any body know how to solve this incremental upgrades to an existing SQLite database without erase any data?

Thanks

I'm not expert on mobile applications, but I believe PlayStore won't update your SQLite database, otherwise your user will lose data.

One popular approach is to have a table in your database holding the version of your SQLite. So, you can always do a SELECT on that field/table (for example, SELECT DB_VERSION FROM APP_CONFIG) to check the current version and then run the proper scripts to update it.

Thanks for your partial answer, I already solved this as you wrote me "using update scripts inside a Table of the SQLiteDB"

I'm planning to renew the FMX Cloud Pack in order to my user backup his SQLite DB into Google Drive and if for some reason he need to change of mobile he can retrieve the "backup" from Google Drive into the mobile device, can you please ask this at TMS because I can't publish my question on your forums, I assume because I did not renew yet such TMS suite.

Thanks

Hi Romero, what exactly is your question about TMS FMX Cloud Pack?
You can indeed use this product to programmatically store files on cloud storage services such as Google Drive.
Note though that we have meanwhile also TMS FNC Cloud Pack that is usable in VCL Windows apps, cross platform FMX apps and TMS WEB Core web client apps. And TMS FNC Cloud Pack offers also cloud storage access on several services including Google Drive, OneDrive, DropBox, ...
As this product can be used everywhere, our future development on cloud service clients is mainly going into this product, so I would recommend you to have a look at it:

Hello

I need a method for my users running Windows, iOS, Android and macOS that can save an SQLite DB into google drive as a backup and later they can download it again into his mobiles devices or computers.

My App is a POS system, so my movil users can not loss his SQLite DB stored in a single file, if my user want to change to another mobile phone or tablet my Software needs to backup the SQLiteDB in a cloud and later the ability to restore it again in another device, that’s my goal, is it possible with TMS FMX Cloud Pack?

Thanks

That can be done with the cloud storage service in TMS FMX Cloud Pack as well as with TMS FNC Cloud Pack.

Thanks Fierens

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.