mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #18468 -- Added support for comments on columns and tables.
Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz Felisiak for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
This commit is contained in:
committed by
Mariusz Felisiak
parent
68ef274bc5
commit
78f163a4fb
@@ -94,7 +94,9 @@ class RelativeFieldTests(SimpleTestCase):
|
||||
name = models.CharField(max_length=20)
|
||||
|
||||
class ModelM2M(models.Model):
|
||||
m2m = models.ManyToManyField(Model, null=True, validators=[lambda x: x])
|
||||
m2m = models.ManyToManyField(
|
||||
Model, null=True, validators=[lambda x: x], db_comment="Column comment"
|
||||
)
|
||||
|
||||
field = ModelM2M._meta.get_field("m2m")
|
||||
self.assertEqual(
|
||||
@@ -110,6 +112,11 @@ class RelativeFieldTests(SimpleTestCase):
|
||||
obj=field,
|
||||
id="fields.W341",
|
||||
),
|
||||
DjangoWarning(
|
||||
"db_comment has no effect on ManyToManyField.",
|
||||
obj=field,
|
||||
id="fields.W346",
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user