#27525: Revert to previous migration automatically after failure when using
MySQL
backend
-------------------------------------+-------------------------------------
Reporter: Sandy Agafonoff | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 1.10
Severity: Normal | Resolution:
Keywords: migrations, mysql, | Triage Stage:
revert | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shai Berger):
* type: Cleanup/optimization => New feature
Comment:
Hi,
Thanks for this suggestion. Three points come to mind:
At a normal "meta" level: If indeed this is a niche request, perhaps it
can be fulfilled by means of a 3rd-party app; apps can override and
enhance Django's management commands. So you can write your own "migrate"
command, or a "migrate_and_on_error_back" command, that will do just that.
At the subject matter level: When a migration fails, it usually means
something unexpected happened. In these circumstances, it is more prudent
to stop and let a human examine the situation, rather than attempt
automatic fixes which are, in essence, based on the assumptions that were
broken. For this reason, I tend to think it isn't a good idea to put such
an option into Django -- adding it would endorse a practice which, I
suspect, is more likely to cause harm than good in the general case.
At the highest "meta" level: If you want to open a discussion, it is
better to do so on the DevelopersMailingList, where many more people will
see it.
--
Ticket URL: <https://code.djangoproject.com/ticket/27525#comment:1>
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/066.b4db6ff643223a4ad7fb6a8cb3490b51%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.