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 migration to convert false tracking fields to null #272

Closed
wants to merge 1 commit into from

Conversation

ash-jc-allen
Copy link
Owner

This PR piggy backs off the back off #244 to solve issue #243.

Currently, if the user agent parser can't detect data from the user agent string, the fields will be stored as false in the short_url_visits table. For example, if we can't detect the visitor's browser version, then the browser_version field will be saved as false.

As of Short URL v8 (to be released shortly), this behaviour has slightly changed. Instead, we'll use null rather than false.

This PR uses @stevebauman's proposed database migration that will update any existing rows that are using false to now be null.

I'm going to sit on this one for a day or so and try to get some other opinions. I'm worried about corrupting anyone's data! 🤯

@ash-jc-allen
Copy link
Owner Author

I've opted to make the migration an optional (yet recommended) step in the upgrade guide.

Just so that I can sleep easy at night without worrying that I've messed up anyone's data, I'll let the developer explicitly make the decision to convert the data themselves haha! I'm not sure if this is the right decision, but I couldn't quite make my mind up.

So I'll close this one for now 🙂

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