I was trying to include JSONField in my model:
from django.contrib.postgres.fields import JSONField
class Trigger(models.Model):
solutions = JSONField(blank=True, null=True)
However, when I try to migrate the database, it gives the following error:
django.db.utils.ProgrammingError: cannot cast type text[] to jsonb
LINE 1: ...ALTER COLUMN "solutions" TYPE jsonb USING "solutions"::jsonb
What could be done here?