#34298: drop constraint if exists
-------------------------------------+-------------------------------------
               Reporter:  sahaliyev  |          Owner:  nobody
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Core       |        Version:  4.1
  (Management commands)              |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Hi there,

 Today encountered a problem, where Django migrate fails to drop constraint
 that actually does not exists.
 Here is the scenario.
 I created constraint  via migration and then go to db and manually drop
 constraint and also changed my code.
 Here, new migration file is generated to drop constraint, however,
 constraint already dropped.
 In this case, migration is giving error.
 It would be great just try to drop constraint and if not exists just pass.
 As PostgreSQL has this functionality, drop constraint if exists.
 Django can also use this.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34298>
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/01070185f2ca5395-e3c0668f-c54f-4d75-b102-126386017732-000000%40eu-central-1.amazonses.com.

Reply via email to