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

feat: migrating storage to version v3 #226

Merged
merged 13 commits into from
Oct 2, 2024
Merged

Conversation

izaaz
Copy link
Collaborator

@izaaz izaaz commented Sep 25, 2024

Summary

This is a fairly big PR so i'll explain everything that is going on in here

  1. Storage context - This is a new class that lets you access storage from older versions. All the old version files were hardcoded in different places so this should provide us a clean way of accessing data from older storage versions.
  2. Created a new class AndroidStorageV2. The old AndroidStorage class was creating directories inside the storage layer. The v2 is a copy of the old AndroidStorage but just takes in storage directory and shared preferences as input. The old class is kept around for backwards compatibility if someone out there is still using it.
  3. Properties file - similar change. It was concatenating different fields and so I moved that logic outside this class.
  4. Migration manager - This class is responsible for migrating data from old storage versions to the latest version. We always migrate from old version directly to the new storage version. No intermediate migrations.

I still need to add diagnostics, but that will come in a different PR.

Here's the storage structure

image

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@izaaz izaaz changed the title Migrating storage to version v3 feat: migrating storage to version v3 Sep 25, 2024
@izaaz izaaz merged commit 3be476b into main Oct 2, 2024
4 checks passed
@izaaz izaaz deleted the AMP-110102/migrate_storage_v3 branch October 2, 2024 17:53
github-actions bot pushed a commit that referenced this pull request Oct 2, 2024
# [1.19.0](v1.18.0...v1.19.0) (2024-10-02)

### Features

* migrating storage to version v3 ([#226](#226)) ([3be476b](3be476b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants