Closed wrvdklooster closed 2 years ago
Since the USE_JSONFIELD
setting is optional, i do not include that migration in the package. If you want to add it then you can do that additional migration like you are doing. It's a sore subject having an optional field being added really makes the migrations tricky
When running
makemigrations
in a project using django-activity-stream withUSE_JSONFIELD=True
a new migration is created.Caused by this code I assume:
Migration created is
actstream/migrations/0004_alter_action_data.py
:Things still work as expected. The data type in our database for that column is text, but the JSONField from Django handles it correctly.
The migration doesn’t generate any sql statement (checked using
sqlmigrate actstream 0004
).We could probably write a migration to store the data as JSON in PostgreSQL but not sure if that is the correct fix.