Skip to content
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

Method to check if file format upgrade is possible #7140

Closed
kneth opened this issue Nov 15, 2023 · 2 comments · Fixed by #7336
Closed

Method to check if file format upgrade is possible #7140

kneth opened this issue Nov 15, 2023 · 2 comments · Fixed by #7336
Assignees

Comments

@kneth
Copy link
Contributor

kneth commented Nov 15, 2023

Describe your problem or use case

In order to prevent the situation described in #7139, a method to check if a file format upgrade can be perform would be useful.

With the method, SDKs can throw an exception if the SoftResetFile schema mode is set - preventing unexpected data loss.

Describe the solution you'd like

bool SharedRealm::canUpgradeFileFormat(std::string path);

Additional context

@jedelbo
Copy link
Contributor

jedelbo commented Dec 1, 2023

The question is if deleting the file in this scenario is the right thing to do.

@jedelbo
Copy link
Contributor

jedelbo commented Feb 9, 2024

I have chosen just not to delete the file. Whether the file should be upgraded or not has nothing to do with the schema.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants