mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #17653 -- Allowed using zero as AutoFields value on MySQL if NO_AUTO_VALUE_ON_ZERO SQL mode is enabled.
This commit is contained in:
@@ -806,7 +806,8 @@ class ThreadTests(TransactionTestCase):
|
||||
class MySQLPKZeroTests(TestCase):
|
||||
"""
|
||||
Zero as id for AutoField should raise exception in MySQL, because MySQL
|
||||
does not allow zero for autoincrement primary key.
|
||||
does not allow zero for autoincrement primary key if the
|
||||
NO_AUTO_VALUE_ON_ZERO SQL mode is not enabled.
|
||||
"""
|
||||
@skipIfDBFeature('allows_auto_pk_0')
|
||||
def test_zero_as_autoval(self):
|
||||
|
||||
Reference in New Issue
Block a user