Reconstitute migration file

Do the things as a proper 3-step process -- add new stuff, copy the data, drop the old.
This commit is contained in:
Jeff Bradberry
2024-01-19 14:37:37 -05:00
committed by Seth Foster
parent 4c5ac1d3da
commit 82323390a7
2 changed files with 39 additions and 49 deletions

View File

@@ -67,10 +67,9 @@ class HasPolicyEditsMixin(HasEditsMixin):
class InstanceLink(BaseModel):
class Meta:
ordering = ("id",)
constraints = [models.UniqueConstraint(fields=['source', 'target'], name='source_target_unique_together')]
source = models.ForeignKey('Instance', on_delete=models.CASCADE, help_text=_("The source instance of this peer link."))
target = models.ForeignKey('ReceptorAddress', on_delete=models.CASCADE, help_text=_("The target receptor address of this peer link."))
target = models.ForeignKey('ReceptorAddress', null=True, on_delete=models.CASCADE, help_text=_("The target receptor address of this peer link."))
class States(models.TextChoices):
ADDING = 'adding', _('Adding')