rpkilby / jsonfield

A reusable Django model field for storing ad-hoc JSON data
MIT License
1.16k stars 271 forks source link

Documentation: Migrating to the builtin JSONField in newer versions of Django #255

Open anrie opened 4 years ago

anrie commented 4 years ago

Hey!

Considering the advice to eventually use Django's builtin JSONField:

If you're an end user of PostgreSQL and want full-featured JSON support, then it is recommended that you use the built-in JSONField.

How would the migration path look like in case you are already using django-jsonfield and want to change to the builtin version?

Is it simply possible to transparently swap the field and go with Django's proposed AlterField migration or are there any gotchas and things to consider?

matteing commented 4 years ago

+1

pymen commented 3 years ago

+1

cbporch commented 2 years ago

How would the migration path look like in case you are already using django-jsonfield and want to change to the builtin version?

Just wanted to clarify, since I'm also looking into swapping to the built-in field: django-jsonfield is not the library contained in this repo.

tserrien commented 10 months ago

Some guide or example project would still be very much appreciated! I'm using this package and not django-jsonfield.

jeffbowen commented 3 weeks ago

FWIW, I was on Django 3.2.24 and simply switched to using the built-in models.JSONField and removed the jsonfield import/requirement. No migration necessary. Everything seems to be working fine.