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

Save files versioning #72

Open
WilliamKarolDiCioccio opened this issue Jun 29, 2024 · 2 comments
Open

Save files versioning #72

WilliamKarolDiCioccio opened this issue Jun 29, 2024 · 2 comments
Assignees
Labels
Department: Backend Issues related to the logic of the code Priority: Low Status: On Hold Type: Maintenance Something to be checked

Comments

@WilliamKarolDiCioccio
Copy link
Owner

I was thinking to start versioning our save files as the app may face changes to the save formats as we add features. By doing so we would then be able to properly convert users data without losing any chat or settings with updates

@WilliamKarolDiCioccio WilliamKarolDiCioccio added Type: Maintenance Something to be checked Priority: Low Status: On Hold Department: Backend Issues related to the logic of the code labels Jun 29, 2024
@Rossi1337
Copy link
Collaborator

I agree otherwise you may run into issues after upgrading the app.
I would do the following.

  • Write the sessions to json files instead of storing them into a Hive DB.
  • Write them into the "applications data" folder instead of the users "documents" folder
  • Add a version number to the json files so we can upgrade them later if we have structural changes.

@WilliamKarolDiCioccio
Copy link
Owner Author

Technically speaking we're already using the JSON format under the hood with Hive, as you can see ChatSessionWrapper is in fact a JSON convertible. We can just add a metadata object that would contain the 'version' field and some along with some other infos allowing us to achieve the same result but keeping users data protected as Hive provides a basic form of encryption by default (we might even upgrade to something like sha-256 in the future). Coming to the second point, I strongly agree with you, we must move sessions to the app data folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Department: Backend Issues related to the logic of the code Priority: Low Status: On Hold Type: Maintenance Something to be checked
Projects
None yet
Development

No branches or pull requests

2 participants