mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fixed a failing schema assertion.
BooleanFields are stored as TINYINT(1) on MySQL.
This commit is contained in:
parent
b9e0ea3cb4
commit
3acdb3068a
@ -209,7 +209,13 @@ class SchemaTests(TransactionTestCase):
|
||||
)
|
||||
# Ensure the field is right afterwards
|
||||
columns = self.column_classes(Author)
|
||||
self.assertEqual(columns['awesome'][0], "BooleanField")
|
||||
# BooleanField are stored as TINYINT(1) on MySQL.
|
||||
field_type, field_info = columns['awesome']
|
||||
if connection.vendor == 'mysql':
|
||||
self.assertEqual(field_type, 'IntegerField')
|
||||
self.assertEqual(field_info.precision, 1)
|
||||
else:
|
||||
self.assertEqual(field_type, 'BooleanField')
|
||||
|
||||
def test_alter(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user