diff --git a/confirmation/migrations/0012_alter_confirmation_id.py b/confirmation/migrations/0012_alter_confirmation_id.py new file mode 100644 index 0000000000..b6aef6aaae --- /dev/null +++ b/confirmation/migrations/0012_alter_confirmation_id.py @@ -0,0 +1,17 @@ +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("confirmation", "0011_alter_confirmation_expiry_date"), + ] + + operations = [ + migrations.AlterField( + model_name="confirmation", + name="id", + field=models.BigAutoField( + auto_created=True, primary_key=True, serialize=False, verbose_name="ID" + ), + ), + ] diff --git a/confirmation/models.py b/confirmation/models.py index 6740b30cb5..0270832c9d 100644 --- a/confirmation/models.py +++ b/confirmation/models.py @@ -207,6 +207,9 @@ def confirmation_url( class Confirmation(models.Model): + id = models.BigAutoField( + auto_created=True, primary_key=True, serialize=False, verbose_name="ID" + ) content_type = models.ForeignKey(ContentType, on_delete=CASCADE) object_id = models.PositiveIntegerField(db_index=True) content_object = GenericForeignKey("content_type", "object_id")