Say I have the following models:
class ParentModel(models.Model):
    parent_field_1 = models.CharField(max_length=10)
    parent_field_2 = models.CharField(max_length=10)
    class Meta:
        constraints = [
            models.UniqueConstraint(
                fields=['parent_field_1', 'parent_field_2', 'child_field_2'],
                name='unique_parent_example'
            )
        ] 
class ChildModel(ParentModel):
    child_field_1 = models.CharField(max_length=10)
    child_field_2 = models.CharField(max_length=10)
I want to utilise the ParentModel's UniqueConstraint but apply an additional field within the ChildModel's UniqueConstraint. I know this is not possible but to help visualise the idea, I'd ideally like to do something like this:
class ChildModel(ParentModel):
    [.. fields ..]
    class Meta:
        constraints = [
            models.UniqueConstraint(
                fields=['parentmodel', 'child_field_2'],
                name='unique_child_example'
            )
        ] 
Almost like I'm building the unique constraint as inheritance also.
How could I do this?