Description
With the following table:
CREATE TABLE example (
a integer,
b integer,
c integer,
PRIMARY KEY (a, c)
);
Running inspectdb produces the following model definition:
class Example(models.Model):
pk = models.CompositePrimaryKey('a', 'c')
a = models.IntegerField()
b = models.IntegerField(blank=True, null=True)
c = models.IntegerField()
class Meta:
managed = False
db_table = 'example'
unique_together = (('a', 'c'),)
I'm pretty sure the last unique_together = (('a', 'c'),) is redundant since the pk = models.CompositePrimaryKey('a', 'c') already implies uniqueness, no?
Description
With the following table:
CREATE TABLE example (
a integer,
b integer,
c integer,
PRIMARY KEY (a, c)
);
Running inspectdb produces the following model definition:
class Example(models.Model):
pk = models.CompositePrimaryKey('a', 'c')
a = models.IntegerField()
b = models.IntegerField(blank=True, null=True)
c = models.IntegerField()
I'm pretty sure the last unique_together = (('a', 'c'),) is redundant since the pk = models.CompositePrimaryKey('a', 'c') already implies uniqueness, no?