Edited MySQL-specific check messages for grammar and consistency.
This commit is contained in:
parent
55ba92a9c9
commit
f7587b20da
|
@ -22,11 +22,10 @@ class DatabaseValidation(BaseDatabaseValidation):
|
||||||
and (field.max_length is None or int(field.max_length) > 255)):
|
and (field.max_length is None or int(field.max_length) > 255)):
|
||||||
errors.append(
|
errors.append(
|
||||||
checks.Error(
|
checks.Error(
|
||||||
('Under mysql backend, the field cannot have a "max_length" '
|
('MySQL does not allow unique CharFields to have a max_length > 255.'),
|
||||||
'greated than 255 when it is unique.'),
|
|
||||||
hint=None,
|
hint=None,
|
||||||
obj=field,
|
obj=field,
|
||||||
id='E047',
|
id='mysql.E001',
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return errors
|
return errors
|
||||||
|
|
|
@ -191,11 +191,10 @@ class CharFieldTests(IsolatedModelsTestCase):
|
||||||
errors = validator.check_field(field)
|
errors = validator.check_field(field)
|
||||||
expected = [
|
expected = [
|
||||||
Error(
|
Error(
|
||||||
('Under mysql backend, the field cannot have a "max_length" '
|
'MySQL does not allow unique CharFields to have a max_length > 255.',
|
||||||
'greated than 255 when it is unique.'),
|
|
||||||
hint=None,
|
hint=None,
|
||||||
obj=field,
|
obj=field,
|
||||||
id='E047',
|
id='mysql.E001',
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
self.assertEqual(errors, expected)
|
self.assertEqual(errors, expected)
|
||||||
|
|
Loading…
Reference in New Issue