mirror of
https://github.com/django/django.git
synced 2025-08-30 23:37:50 +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:
parent
730711e828
commit
83f55aafdd
7 changed files with 27 additions and 8 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue