#24850: Squashed migration not recognized as an initial migration
-------------------------------+--------------------
     Reporter:  riklaunim      |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Migrations     |    Version:  1.8
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 I have constant problems with squash migrations not being recognised as
 initial migrations.

 - when '''replaces''' and old migrations exist it's ok
 - when '''replaces''' exist and old migrations do not it's ok if there are
 not dependant migrations in other apps (or NodeNotFoundError will be
 thrown)
 - when both do not exist it tries to execute the migration which fails on
 an existing database as tables exist

 Running migrations with --fake is a local solution, but definitely not
 optimal for deployment where other migrations may show up and so on. In
 only one simple example I managed to get migration auto-faked, recognised
 as initial. In every other it tries to apply it.

 I would say that a squash should have an explicit flag that would affect
 data in django_migrations. Some sort of get_or_create with an entry for
 that squashed migration so that no matter where the code will go - the
 table will be updated without the need of any forced --fake operations.

--
Ticket URL: <https://code.djangoproject.com/ticket/24850>
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.5c7c83b7805192d69df1815c9f1f673b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to