-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All production users local data gets lost on DataStore migration #3746
Comments
Thank you for posting the issue. Local migrations (i.e. migrations controlled by the developer) on device are not currently supported. Therefore, your local data will be lost when the schema changes. |
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
@thisisabhash |
The reason for clearing the entire local database is because we don't know the details of the schema changes, if it was an additive or destructive change. So, Amplify assumes it can no longer operate on the same tables. The local database contains the tables from before the schema changes and also, some internal tables to perform Datastore's sync engine related tasks. This is a feature request - to perform more granular operations during schema upgrades which will facilitate local migration. |
Describe the bug
Hi Team,
almost all production users data got lost when updated AmplifyModels.
Before updating the app, users were having all the data, once they updated the app, their old local data got lost.
Its heartbreaking.....🥲🥲🥲 as our app is health app and all the health data is lost now.
Steps To Reproduce
-
Expected behavior
Datastore should not clear the local data
Amplify Framework Version
2.33.6
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
5.9.2
CLI version
12.11.1
Xcode version
15.0
Relevant log output
Is this a regression?
Yes
Regression additional context
No response
Platforms
iOS
OS Version
iOS 17.0
Device
iPhone15
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: