Add merge migrations for parks, companies, and moderation apps; update EmailConfiguration, Review, Photo, TopList, and TopListItem models to use pghistory for historical tracking

This commit is contained in:
pacnpal
2025-02-09 16:00:10 -05:00
parent b7f6c60682
commit 228eeeb3c8
30 changed files with 779 additions and 1654 deletions

View File

@@ -2,8 +2,11 @@ from django.db import models
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.core.validators import MinValueValidator, MaxValueValidator
from history_tracking.models import TrackedModel
import pghistory
class Review(models.Model):
@pghistory.track()
class Review(TrackedModel):
# Generic relation to allow reviews on different types (rides, parks)
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
object_id = models.PositiveIntegerField()