Best practices for in-app database migration for Sqlite

前端 未结 8 2076
囚心锁ツ
囚心锁ツ 2020-11-30 16:31

I am using sqlite for my iphone and I anticipate the database schema might change over time. What are the gotchas, naming conventions and things to watch out for to do a su

8条回答
  •  长情又很酷
    2020-11-30 17:14

    The best solution IMO is to build a SQLite upgrade framework. I had the same problem (in the C# world) and I built my own such framework. You can read about it here. It works perfectly and makes my (previously nightmarish) upgrades work with minimal effort on my side.

    Although the library is implemented in C#, the ideas presented there should work fine in your case also.

提交回复
热议问题