Update sqlite database for iphone

Consider a SQLite database for an iPhone application with some “documents” as templates. The user can also add their own templates.

I want to update the program and database. Is there any way to do this without overwriting user data?

I looked at two different databases, but since this is an overhead, I want to avoid this option.

How can this be done without overwriting user data?

+3
source share
3 answers

Core Data, () "" . . , .., NSEntityMigrationPolicy.

,

Marcus Zarra " ".

+1

db . , , , db. / ( ).

0

When updating the application and data warehouse, deliver the ALTERscripts in the service pack. When the application starts, it should:

  • check if a database update is required (version number, etc.).
  • run the scripts ALTERand UPDATEto execute the schema and data v1 to v2
0
source

Source: https://habr.com/ru/post/1771331/


All Articles