'How update only one value inside field of table Sqlite when update from store my App Swift IOS

I have an IOS app in Swift, let’s say version 1.0.0, and the sqlite scheme provides a table "Person" with the fields "name", "surname", "address" and "flag_first_use".

As soon as a user downloads the app, some screens are displayed and "flag_first_use" = true (the default is false).

I wish that when an old user updates the app to version 1.0.1 automatically they had "flag_first_use"= false.

How can i do it?

Thanks to everyone!



Solution 1:[1]

The solution of my problem is the creation of file migration. In this file i can manage the value of my attribute.

So in file migration1.0.0_to_1.0.1 i set that flag_first_use = false

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 T_TR_ZCS