Am making an app, which contains a database in the assets folder, say the database as db1. When I open the app, am again creating a db using the API'S. Both the db names are similar.
When copying the db I see that the db1 created using api`s is getting over written by db1 in assets. Here I have a solution that first to copy the db from assets then followed by open the same in java. In assets folder db it contains tables namely A,B,C and the db created using code am making tables A,B,C,D,E,F.
Now what I want is:
When I give an upgrade for the app, I cannot blindly copy the database in the assets will overwrite all the existing data in the db1( All tables ). I want to know can I copy the database with some other name say db2. Then open and copy all the tables in db2 and overwrite those tables in db1 with the newly copied tables; i,e tables A,B,C tables in db1 has to be replaced with with the tables in db2.
I want know if it is possible or not? If possible some give me some samples are references.