diff --git a/ureport/polls/migrations/0080_alter_pollresult_id.py b/ureport/polls/migrations/0080_alter_pollresult_id.py new file mode 100644 index 000000000..d5d4283df --- /dev/null +++ b/ureport/polls/migrations/0080_alter_pollresult_id.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.2 on 2025-01-06 09:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("polls", "0079_remove_poll_polls_poll_org_id_published_id_6b0e6423_idx_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="pollresult", + name="id", + field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"), + ), + ] diff --git a/ureport/polls/models.py b/ureport/polls/models.py index c0a4512de..78c5960b0 100644 --- a/ureport/polls/models.py +++ b/ureport/polls/models.py @@ -1363,6 +1363,8 @@ class Meta: class PollResult(models.Model): + id = models.BigAutoField(auto_created=True, primary_key=True, verbose_name="ID") + org = models.ForeignKey(Org, on_delete=models.PROTECT, related_name="poll_results", db_index=False) flow = models.CharField(max_length=36)