Opened 3 years ago
Closed 3 years ago
#33246 closed Cleanup/optimization (fixed)
--squashed-name can overwrite existing migration files
Description ¶
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.
Change History (5)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
comment:3 by , 3 years ago
Patch needs improvement: | set |
---|
comment:4 by , 3 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Note:
See TracTickets
for help on using tickets.
PR: https://github.com/django/django/pull/15038