diff --git a/app/org_eleicoes/votepeloclima/candidature/migrations/0006_alter_candidature_options_and_more.py b/app/org_eleicoes/votepeloclima/candidature/migrations/0006_alter_candidature_options_and_more.py index 5508a239..91a9b4b1 100644 --- a/app/org_eleicoes/votepeloclima/candidature/migrations/0006_alter_candidature_options_and_more.py +++ b/app/org_eleicoes/votepeloclima/candidature/migrations/0006_alter_candidature_options_and_more.py @@ -1,6 +1,5 @@ -# Generated by Django 4.2 on 2024-07-22 21:30 +# Generated by Django 4.2 on 2024-07-23 19:13 -import django.contrib.postgres.fields from django.db import migrations, models @@ -22,11 +21,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='candidature', name='milestones', - field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=140), blank=True, null=True, size=5), + field=models.JSONField(blank=True, default=list, null=True), ), migrations.AddField( model_name='candidature', name='social_media', - field=django.contrib.postgres.fields.ArrayField(base_field=models.URLField(blank=True), blank=True, null=True, size=5), + field=models.JSONField(blank=True, default=list, null=True), ), ] diff --git a/app/org_eleicoes/votepeloclima/candidature/models.py b/app/org_eleicoes/votepeloclima/candidature/models.py index 5ff3de25..ecea281c 100644 --- a/app/org_eleicoes/votepeloclima/candidature/models.py +++ b/app/org_eleicoes/votepeloclima/candidature/models.py @@ -1,6 +1,5 @@ from django.db import models from django.contrib.auth.models import User -from django.contrib.postgres.fields import ArrayField from django.core.serializers.json import DjangoJSONEncoder @@ -29,12 +28,12 @@ class Candidature(models.Model): gender = models.CharField(max_length=30) color = models.CharField(max_length=30) sexuality = models.CharField(max_length=30, null=True, blank=True) - social_media = ArrayField(models.URLField(blank=True), size=5, null=True, blank=True) + social_media = models.JSONField(blank=True, null=True, default=list) # Step 4 education = models.CharField(max_length=50, null=True, blank=True) employment = models.CharField(max_length=50, null=True, blank=True) short_description = models.TextField() - milestones = ArrayField(models.CharField(max_length=140, blank=True), size=5, null=True, blank=True) + milestones = models.JSONField(blank=True, null=True, default=list) # Step 5 flags = models.JSONField(blank=True) # Step 6