confirmation: Migrate Confirmation to bigint.

This model has no external references, and is among the larger
tables.  Migrate it to bigint.
This commit is contained in:
Alex Vandiver
2024-05-29 20:12:14 +00:00
committed by Tim Abbott
parent 37803406e5
commit 53b30ed65d
2 changed files with 20 additions and 0 deletions

View File

@@ -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"
),
),
]

View File

@@ -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")