#24543: Add checks / command options for "migrations not applied" and "migrations needed" -----------------------------+-------------------------------------- Reporter: blueyed | Owner: Type: New feature | Status: new Component: Migrations | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------+--------------------------------------
Comment (by shaib): This feature request would be useful, IMO, if there were easy ways to tell destructive migrations apart from non-destructive, and/or run only non- destructive ones. However, as migrations are not built to support these notions, this is a rather big "if". This is a little academic, but (Replying to [comment:6 MarkusH]): > Furthermore, you can't reply on `MAX(id)`. If you roll-back a migration the item is removed from the table and e.g. Postgres doesn't reset the sequence. ... this means you can't trust `MAX(id)` to tell you the id of the first migration to be applied. On Postgres It is still true, though, AFAIK, that all future migrations will be recorded with larger ids. On Oracle `MAX(id)` really cannot be trusted, because of sequence value caching (that is, the next value retrieved from a sequence is only guaranteed to be larger than all previous ones retrieved on the same connection). -- Ticket URL: <https://code.djangoproject.com/ticket/24543#comment:7> 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/065.63ae780e38041aed1b9c9c259052b8d3%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.