#23745: Migrations migrate is slow
-------------------------------------+-------------------------------------
     Reporter:  claudep              |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Migrations           |                  Version:  master
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by vstoykov):

 I found a snippet for disabling migrations
 https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09 and assembled it in
 my settings.py to easy turn off them when I want.

 {{{
 if os.getenv('DISABLE_MIGRATIONS'):

     class DisableMigrations(object):

         def __contains__(self, item):
             return True

         def __getitem__(self, item):
             return "notmigrations"


     MIGRATION_MODULES = DisableMigrations()
 }}}

 This is dirty hack put in settings.py but do the job. For Django 1.9 even
 can be simplified by {{{return None}}} instead of {{{return
 "notmigrations"}}}

 Probably some switch to test command {{{--no-migrations}}} or something
 that will do something like that can be useful.

--
Ticket URL: <https://code.djangoproject.com/ticket/23745#comment:18>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0102c5e174740e617a785b2981463d5f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to