mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
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:
committed by
Tim Abbott
parent
37803406e5
commit
53b30ed65d
17
confirmation/migrations/0012_alter_confirmation_id.py
Normal file
17
confirmation/migrations/0012_alter_confirmation_id.py
Normal 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"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -207,6 +207,9 @@ def confirmation_url(
|
|||||||
|
|
||||||
|
|
||||||
class Confirmation(models.Model):
|
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)
|
content_type = models.ForeignKey(ContentType, on_delete=CASCADE)
|
||||||
object_id = models.PositiveIntegerField(db_index=True)
|
object_id = models.PositiveIntegerField(db_index=True)
|
||||||
content_object = GenericForeignKey("content_type", "object_id")
|
content_object = GenericForeignKey("content_type", "object_id")
|
||||||
|
|||||||
Reference in New Issue
Block a user