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

Verify schema on open #1108

Merged
merged 4 commits into from
Aug 26, 2020
Merged

Verify schema on open #1108

merged 4 commits into from
Aug 26, 2020

Conversation

dfahlander
Copy link
Collaborator

@dfahlander dfahlander commented Aug 25, 2020

Warn on console in the case that the schema is altered without a version increment.
Don't fail, because this could destroy prod environments that works despite a faulty schema.
Warn unconditionally no matter the value of Dexie.debug. This is an important warning and it can be easily fixed by the user - just increment version number passed to db.version(...).

Reason 1: There are scenarios when this failure would have been working in production. For example when a declared index is never used. We cannot start destroying dexie user's apps when they upgrade.
Reason 2: If we throw, there is a great chance people don't catch and don't understand or see the error. If we warn, people will always see it in the console.
@dfahlander dfahlander merged commit 6b3befd into master Aug 26, 2020
@dfahlander dfahlander deleted the verify-schema-on-open branch September 9, 2020 21:45
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.

1 participant