#31410: makemigrations doesn't check that UniqueConstraint field names exist
----------------------------------+--------------------------------------
     Reporter:  Marnanel Thurman  |                    Owner:  nobody
         Type:  Uncategorized     |                   Status:  new
    Component:  Migrations        |                  Version:  3.0
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Description changed by Marnanel Thurman:

Old description:

> When a model gains a `UniqueConstraint`, makemigrations doesn't check
> that the fields named therein actually exist.
>
> This is in contrast to the older `unique_together` syntax, which raises
> models.E012 if the fields don't exist.
>
> In the attached demonstration, you'll need to uncomment
> `"with_unique_together"` in settings.py in order to show that
> `unique_together` raises E102.

New description:

 When a model gains a `UniqueConstraint`, makemigrations doesn't check that
 the fields named therein actually exist.

 This is in contrast to the older `unique_together` syntax, which raises
 models.E012 if the fields don't exist.

 In the attached demonstration, you'll need to uncomment
 `"with_unique_together"` in settings.py in order to show that
 `unique_together` raises E012.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31410#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.2982bb8d468875e22053e9debb038ac1%40djangoproject.com.

Reply via email to