#27525: Revert to previous migration automatically after failure when using
MySQL
backend
-------------------------------------+-------------------------------------
Reporter: Sandy | Owner: nobody
Agafonoff |
Type: | Status: new
Cleanup/optimization |
Component: | Version: 1.10
Migrations | Keywords: migrations, mysql,
Severity: Normal | revert
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Owing to the fact MySQL does not support transactional DDL, would it be
possible to automatically migrate to the previous migration, rather than
leave the database in an inconsistent state?
Obviously, not all statements in a migration can be reversed, and,
reverting to the previous migration is currently the developers decision,
however in a cloud based CI/CD, automatic deployment based environment,
allowing this to be run without human intervention would be a plus.
Possibly a flag on the migrate command like --fail-revert, or possibly a
field in the migration class would be best, so I can decide on a per-
migration basis the behaviour I would intend.
I understand this is going to be a niche request, however, I would like to
open a discussion to see if there is some merit here.
--
Ticket URL: <https://code.djangoproject.com/ticket/27525>
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/051.9c65ffe2d8e260d07782a70cfa860e00%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.