#29720: Validating migrations using manage.py
-------------------------------------+-------------------------------------
               Reporter:  tombasche  |          Owner:  nobody
                   Type:  New        |         Status:  new
  feature                            |
              Component:             |        Version:  2.1
  Migrations                         |       Keywords:  migrations,
               Severity:  Normal     |  manage.py, validation
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 At work we have several Django services each with several apps. Usually
 after a few devs merge pull requests into the main branch in Git we get
 migrations with the same number. From time to time there's also some
 reordering with dependencies in migrations leap-frogging the previous one.

 This obviously gets picked up at run time, but it would be cool to be able
 to determine this at build time. Obviously we should all take more care,
 but I would consider this more of a "linting" stage than anything else.

 In the interim I wrote (or rather, hacked together) a cli tool that
 validates this, but ultimately this would be better suited as a manage.py
 command. Something like {{{manage.py validate-migrations }}}. All it has
 to do is check the migration numbers are incremental and that their
 dependencies refer to the previous migration in the list.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29720>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.e9eed6104c33a75677fb7b90c7b68997%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to