Answer the question
In order to leave comments, you need to log in
When to update the data in the database?
Good afternoon!
I have written an application in which data is saved in the sqlite database, there is also a functionality that synchronizes sqlite with postgres only new records. and I would also like to synchronize record updates - that is, if a record in sqlite was changed, then these changes were sent to postgres as well.
but the problem is that if I deleted the application and the local database was deleted, how then to determine which data in postgres is old and which is new? randomize a unique code every time ? that is, if the database is created on a new one and pass this code every time you update it in postgres. what mechanisms are implemented
Answer the question
In order to leave comments, you need to log in
1. Immediately after installing the application, do a reverse synchronization (download) from postgres to sqlite of the necessary new (see timestamp) data for the application.
2. After downloading - be sure to verify the full synchronization of data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question