My idea came after reading the "Android Merket" topic but have decided to separate the discussion as I am asking generally and don't have any specific problem. Here is a copy of what I wrote in the other topic:
This is a very interesting topic for me too.
I've been thinking - if I implement the version table solution, what would it cause. Let's say my versions are integer - 1,2,3,4,5....
I publish my application with version 1. Then, do some updates and provide version 2, then 3 and so on. What if a user having a version 1 wants to migrate do version 5?
Maybe the best way is to make version-orientated logic.
E.g
in version 2, add "SUM" column to "money" table.
in version 3, add "TOTAL" column to "money table.
in version 4,.5....
Therefore, the function goes through all versions and does the changes one after another.
Another approach, isn't it easier to export user data? With this approach no SQL structure changes will be ever made and it will be only data that you will transfer between databases. But it won't be easy as you will have to build multiple INSERT queries.
What do you think?
This is a very interesting topic for me too.
I've been thinking - if I implement the version table solution, what would it cause. Let's say my versions are integer - 1,2,3,4,5....
I publish my application with version 1. Then, do some updates and provide version 2, then 3 and so on. What if a user having a version 1 wants to migrate do version 5?
Maybe the best way is to make version-orientated logic.
E.g
in version 2, add "SUM" column to "money" table.
in version 3, add "TOTAL" column to "money table.
in version 4,.5....
Therefore, the function goes through all versions and does the changes one after another.
Another approach, isn't it easier to export user data? With this approach no SQL structure changes will be ever made and it will be only data that you will transfer between databases. But it won't be easy as you will have to build multiple INSERT queries.
What do you think?