0

What is the best approach to use to make sure that previous versions of your mobile app don't crash when making changes to your backend database on a published app?

I've tried putting a check for database version on my app to show a need for updating the app if anything like that ever happens, but I'm not sure if this is the best approach. I don't think I've ever experienced a forced update on any mobile apps out there... so I'm not sure!

  • The main problem is that you can't change the datatypes and columnnames that your old application uses. You only can add new columns and tables. That can be quite hard, because you can't change the bad decisions you made in the past. – nbk Aug 10 '19 at 00:15

1 Answers1

0

Changing the schema completely isn't something you can afford when your old version of the app relies on.

If the cost of losing the old version isn't much, then you can just ignore them and ask them to update.

And if you can't afford to lose your old versions, you should add columns or even new tables for new versions and then handle the data validation on your codes and also separate the API versions so both old and new versions can get the right data.

You usually have to keep going with this approach until the cost of losing an old version is low enough to end the support with it.

It's really hard to get everything right on the first attempt especially for large scale apps even if you are experienced. You will get to the point that you have to make changes to be able to scale.

Navid Zarepak
  • 4,148
  • 1
  • 12
  • 26