mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 15:31:08 -05:00
Refactor URL patterns for parks and rides; update context fields in models to use ForeignKey for pghistory.Context
This commit is contained in:
@@ -50,7 +50,13 @@ class RideEvent(models.Model, DiffMixin):
|
||||
|
||||
# Context fields
|
||||
pgh_obj = models.ForeignKey('Ride', on_delete=models.CASCADE)
|
||||
pgh_context = models.JSONField(null=True)
|
||||
pgh_context = models.ForeignKey(
|
||||
'pghistory.Context',
|
||||
on_delete=models.DO_NOTHING,
|
||||
db_constraint=False,
|
||||
related_name='+',
|
||||
null=True,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
db_table = 'rides_rideevent'
|
||||
@@ -80,7 +86,13 @@ class RideModelEvent(models.Model, DiffMixin):
|
||||
|
||||
# Context fields
|
||||
pgh_obj = models.ForeignKey('RideModel', on_delete=models.CASCADE)
|
||||
pgh_context = models.JSONField(null=True)
|
||||
pgh_context = models.ForeignKey(
|
||||
'pghistory.Context',
|
||||
on_delete=models.DO_NOTHING,
|
||||
db_constraint=False,
|
||||
related_name='+',
|
||||
null=True,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
db_table = 'rides_ridemodelevent'
|
||||
|
||||
Reference in New Issue
Block a user