I am using Sqldiff tool to find the difference in the two databases.
I have an Android client that uses Sqlite database. I want to update the db remotely by supplying a sql patch file. This patch should go irrespective of the client being updated via PlayStore.
I tried using Sqldiff using this option.
sqldiff old.db new.db --primarykey > patch.sql
But the output sql queries are with INSERT queries and UPDATE queries. An accidental patch of two times could make the client crash with UNIQUE CONSTRAINT failed error. And I need to generate diff for each sub version patched.
I need the sqldiff to generate queries that are safe to replace irrespective of multiple patches.
Does sqldiff have this option? or what's the simplest and safest way to achieve this?
Aucun commentaire:
Enregistrer un commentaire