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

Remove jsonfield dependency #2283

Closed
wants to merge 1 commit into from

Conversation

singingwolfboy
Copy link
Contributor

Now that Django has a built-in JSONField type, we don't need to depend on the jsonfield library. This pull request removes that dependency.

To test this pull request, I suggest dumping your database and re-running all the database migrations to be sure they work successfully. I did that on my computer, and had no problems.

@odlbot odlbot temporarily deployed to micromasters-ci-pr-2283 January 9, 2017 16:15 Inactive
@noisecapella
Copy link
Contributor

I don't think this is a good idea. The field used by the jsonfield dependency isn't the same postgres field as the jsonb field in the django json field type. I'm also generally against modifying our migrations unless we really need to. What happens if people need to roll back migrations at some point?

@singingwolfboy
Copy link
Contributor Author

Theoretically, the Django JSONField type should behave identically to the jsonfield type. However, theory and practice don't always align, so I understand where you're coming from. Reducing dependencies is good, but reducing migration-related risk is also good. I'll close this pull request for now, and we can always come back to it later if we decide it's a good idea.

@noisecapella
Copy link
Contributor

They do not behave identically. The Django JSONField type uses the jsonb postgres type, the jsonfield type uses the json postgres type (source: rpkilby/jsonfield#57 (comment)). One of the reasons we migrated in the first place was to get query functionality that we didn't have with the json type

@noisecapella noisecapella deleted the remove-jsonfield-dependency branch January 9, 2017 16:52
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.

3 participants