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: optional backup on storage migration #1745

Merged

Conversation

genaris
Copy link
Contributor

@genaris genaris commented Feb 6, 2024

Make storage backup optional during wallet storage migration process. This is mainly to allow storage migration for those wallets that do not support exporting (like Askar wallets using PosgreSQL).

@TimoGlastra I have to review it a bit more and add some tests, but wanted to open it now so you can check if it fits the changes you are doing on your side.

Signed-off-by: Ariel Gentile <gentilester@gmail.com>
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
@@ -82,7 +82,7 @@ describe('UpdateAssistant | AnonCreds | v0.3.1 - v0.4', () => {
},
])

await updateAssistant.update('0.4')
await updateAssistant.update({ updateToVersion: '0.4' })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: update in update docs

@@ -71,6 +71,10 @@ export class AgentConfig {
return this.initConfig.autoUpdateStorageOnStartup ?? false
}

public get backupBeforeStorageUpdate() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to consider though that not creating a backup may be seen as advanced and you should use the update assistant in this case? But if it's useful to add this to the default agent startup, then I'm ok with it 👍

packages/core/src/storage/migration/UpdateAssistant.ts Outdated Show resolved Hide resolved
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
@genaris genaris enabled auto-merge (squash) February 6, 2024 19:07
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
@genaris genaris merged commit 81ff63c into openwallet-foundation:main Feb 6, 2024
7 checks passed
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