Migrate LogEntry.object_id to bigint (#5520)

This commit is contained in:
Raphael Michel
2025-10-15 09:06:38 +02:00
committed by GitHub
parent adca856cdb
commit a1d078b48e
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 4.2.16 on 2025-10-06 16:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("pretixbase", "0290_invoice_plugin_data"),
]
operations = [
migrations.AlterField(
model_name="logentry",
name="object_id",
field=models.PositiveBigIntegerField(db_index=True),
),
]

View File

@@ -66,7 +66,7 @@ class LogEntry(models.Model):
:type data: str
"""
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
object_id = models.PositiveIntegerField(db_index=True)
object_id = models.PositiveBigIntegerField(db_index=True)
content_object = GenericForeignKey('content_type', 'object_id')
datetime = models.DateTimeField(auto_now_add=True)
user = models.ForeignKey('User', null=True, blank=True, on_delete=models.PROTECT)