#36643: Migrate should not check for consistent history when faking migrations
-----------------------------------+--------------------------------------
     Reporter:  Alexandru Chirila  |                     Type:  Bug
       Status:  new                |                Component:  Migrations
      Version:  5.2                |                 Severity:  Normal
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  1                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
 If for some reason or another you end up needing to fake apply a
 migration, it will still run the `check_consistent_history`.

 So if you ended up by accident (or on purpose somehow?) with a invalid
 migration history, there is no way of fixing it except manually doing
 things in the `django_migrations` table.

 It seems like a scenario like this ought to be fixable using the "fake"
 apply of migrations, but as far as I can tell there is no way of doing
 that as the check will always fell and throw an error, so the fake
 aplication can never be done.

 {{{
 .venv/lib/python3.12/site-packages/django/db/migrations/loader.py", line
 327, in check_consistent_history
     raise InconsistentMigrationHistory(
 django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
 shortner.0001_initial is applied before its dependency charts.0001_initial
 on database 'default'.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36643>
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/01070199bdc2983b-8a3c66f9-4f30-434a-b807-4a5792ea1397-000000%40eu-central-1.amazonses.com.

Reply via email to