mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #17713 -- Renamed BaseDatabaseFeatures.allows_primary_key_0 to allows_auto_pk_0.
MySQL does allow primary key with value 0. It only forbids autoincrement primary key with value 0. Thanks Claude Paroz for the report.
This commit is contained in:
@@ -162,7 +162,7 @@ class InlineFormsetFactoryTest(TestCase):
|
||||
Parent, Child, exclude=('school',), fk_name='mother'
|
||||
)
|
||||
|
||||
@skipUnlessDBFeature('allows_primary_key_0')
|
||||
@skipUnlessDBFeature('allows_auto_pk_0')
|
||||
def test_zero_primary_key(self):
|
||||
# Regression test for #21472
|
||||
poet = Poet.objects.create(id=0, name='test')
|
||||
|
||||
Reference in New Issue
Block a user