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

How could I access to a different version of a database in runtime? #435

Closed
AndyCRJ opened this issue Jan 21, 2025 · 5 comments
Closed

How could I access to a different version of a database in runtime? #435

AndyCRJ opened this issue Jan 21, 2025 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@AndyCRJ
Copy link

AndyCRJ commented Jan 21, 2025

I need to know if there's a way to access to the database configured for the provider of the library if at any time it got an update, because when the version of it gets an update, and I try to access to the data, I get the error:

interactive-map.component.ts:168 ERROR IndexedDB error: VersionError: The requested version (1) is less than the existing version (2).

I understand that is because in the configuration object we declared the version statically, so I want to know if there's a way to update dynamically the version to access to it.

Thanks.

@aparzi aparzi added the duplicate This issue or pull request already exists label Jan 22, 2025
@aparzi
Copy link
Collaborator

aparzi commented Jan 22, 2025

Hi @AndyCRJ,
possible duplicate #310. There is already an open PR, I should accept it in these days, in that case you can try again with the new version

@aparzi aparzi closed this as completed Jan 22, 2025
@AndyCRJ
Copy link
Author

AndyCRJ commented Jan 22, 2025

Thank you for your reply, I'll wait for the new version then.

@aparzi
Copy link
Collaborator

aparzi commented Jan 23, 2025

Hi @AndyCRJ,
I released a new version for indexeddb that allows you to add object stores dynamically without specifying the version. Let me know if you solve it, otherwise I'll look into it further. Is your application used in two tabs by any chance?

@AndyCRJ
Copy link
Author

AndyCRJ commented Jan 23, 2025

I just updated the library and tested without indicating the version in the DBConfig object and everything goes well except for the warning in the console, but that doesn't bother me, so thank you for notice me about the new version!. And answering your question, no, normally my app it's not used in multiple tabs.

@aparzi
Copy link
Collaborator

aparzi commented Jan 23, 2025

I just updated the library and tested without indicating the version in the DBConfig object and everything goes well except for the warning in the console, but that doesn't bother me, so thank you for notice me about the new version!. And answering your question, no, normally my app it's not used in multiple tabs.

Awesome 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants