mirror of
https://github.com/django/django.git
synced 2025-08-10 05:48:15 +00:00
[1.8.x] Fixed #24893 -- Fixed lack of unique constraint when changing a field from primary_key=True to unique=True
Backport of e1e6399c2c
from master
This commit is contained in:
parent
8911d2e20f
commit
1c57d7e7fa
4 changed files with 46 additions and 1 deletions
|
@ -82,6 +82,7 @@ class BookWithSlug(models.Model):
|
|||
|
||||
class IntegerPK(models.Model):
|
||||
i = models.IntegerField(primary_key=True)
|
||||
j = models.IntegerField(unique=True)
|
||||
|
||||
class Meta:
|
||||
apps = new_apps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue