inyokaproject / inyoka

All-in-one portal software
http://inyokaproject.org
Other
13 stars 4 forks source link

Use django’s JSONField #1271

Open chris34 opened 1 year ago

chris34 commented 1 year ago

Inyoka has a custom JSONField Basically, this will work.

However, Django offers nowadays an own JSONField:

Migrating to Django's one could save maintenance (in the longterm) and make queries easier. However, it is unclear, how much work it is to migrate.

encbladexp commented 2 weeks ago

Does our own JSONField use the DB native column types, or just TEXT with a JSON in it?

chris34 commented 2 weeks ago

hm, seems like the line number where the class is located changed

https://github.com/inyokaproject/inyoka/blob/7de28b02c730969b3b51c03619619e7514a851a8/inyoka/utils/database.py#L153

At the moment it's only a Textfield with Python's json.loads(s) and json.dumps(obj, cls=DjangoJSONEncoder).