#33246: --squashed-name can overwrite existing migration files
--------------------------------------+------------------------
Reporter: AndrewN | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+------------------------
`squashmigrations --squashed-name initial myapp 0002` will overwrite
`0001_initial.py`. If that migration has already been applied anywhere,
the code and the database will be in an inconsistent state. Furthermore,
the `0002_...` migration likely depends on `0001_initial`, so the new
`replaces = …0002…` line added to `0001_initial.py` introduces a
`CircularDependencyError`.
`squashmigrations` should exit with an error instead of overwriting
existing migration files.
--
Ticket URL: <https://code.djangoproject.com/ticket/33246>
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/050.c2758b312d72ce9a68a8e408379faa07%40djangoproject.com.