Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native and sqlite migrations

It's difficult to find a lot of examples of people using sqlite with their react native apps.

I'm going to be using this library : https://github.com/craftzdog/react-native-sqlite-2

Is there a good option out there for managing the client db schema post-launch? On our server apps we have a migration lib that does the work of deciding which "migrations" should be run. Is there something similar for RN or is it a "do it yourself" situation?

like image 397
Aaron Bruce Avatar asked Nov 07 '22 12:11

Aaron Bruce


1 Answers

I believe it's a "do it yourself" situation in React Native. I've made a migration table which tracks which migrations have already been run along with a timestamp. All migrations not in the table get run upon launch.

like image 166
tom Avatar answered Nov 15 '22 12:11

tom