mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Fixed #28646 -- Prevented duplicate index when unique is set to True on PostgreSQL.
This commit is contained in:
@@ -147,6 +147,20 @@ class IntegerPK(models.Model):
|
||||
db_table = "INTEGERPK" # uppercase to ensure proper quoting
|
||||
|
||||
|
||||
class CharFieldPK(models.Model):
|
||||
field1 = models.CharField(max_length=10, primary_key=True)
|
||||
|
||||
class Meta:
|
||||
apps = new_apps
|
||||
|
||||
|
||||
class CharFieldPKUnique(models.Model):
|
||||
field1 = models.CharField(max_length=10, primary_key=True, unique=True)
|
||||
|
||||
class Meta:
|
||||
apps = new_apps
|
||||
|
||||
|
||||
class Note(models.Model):
|
||||
info = models.TextField()
|
||||
address = models.TextField(null=True)
|
||||
|
||||
Reference in New Issue
Block a user