#36643: Migrate should not check for consistent history when faking migrations
-----------------------------------+--------------------------------------
Reporter: Alexandru Chirila | Owner: (none)
Type: New feature | Status: closed
Component: Migrations | Version: 5.2
Severity: Normal | Resolution: wontfix
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 Alexandru Chirila):
While I don't agree with the conclusion here, I do understand where it's
coming from, so I'll leave it be.
-----
I'll leave here the hacky solution for this problem, for any unfortunate
soul that finds themselves in such a terrible mess that I've created for
myself.
* Check the status of migrations using `./manage.py showmigrations`, looks
for the ones that are applied and are confusing the Django consistency
check.
* Remove from the DB directly the applied migrations for the app(s) in
question:
{{{
delete from django_migrations where app='APPNAME';
}}}
* Fake apply migrations for the one just removed:
{{{
./manage.py migrate APPNAME --fake
}}}
* Fake apply any other migrations for the other apps that have been
squashed
--
Ticket URL: <https://code.djangoproject.com/ticket/36643#comment:8>
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 visit
https://groups.google.com/d/msgid/django-updates/01070199e31de4e4-ebe9b936-c35f-46d6-b782-dce101448f5b-000000%40eu-central-1.amazonses.com.