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

Add destructive migration to database downgrade #217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vincent-paing
Copy link
Contributor

@vincent-paing vincent-paing commented May 23, 2023

Added a destructive migration whenever db downgrade from any versions.

This might not really be scalable as we need to add one more drop table in onDowngrade we have new table. A better solution might be to query the sqlite master table for tables names then recursively drop them one by one. Since we only have 3 tables for now, I made a conscious decision not to do early abstraction.

I also added a integration test with the database to make sure the downgrade and upgrade went smoothly.

Attempt to fix #216

This might not really be scalable as we need to add one more drop table in `onDowngrade` we have new table. A better solution might be to query the sqlite master table for tables names then recursively drop them one by one. Since we only have 3 tables for now, I made a conscious decision not to do early abstraction.

Fixes Tealium#216
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.

No downgrade implementation for database causes crash on library downgrade
1 participant