#32634: AlterField drops contraints in the wrong order when performed as reverse
migration
----------------------------------+--------------------------------------
Reporter: Matthias Dellweg | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 3.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => invalid
Comment:
Matthias, thanks for details, however this is not a migration created by
Django. Everything works when I will remove `0002_auto_20210413_0915.py`
and use a generated migration:
{{{
$ python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, pk_migration, sessions
Running migrations:
Applying pk_migration.0001_initial... OK
Applying pk_migration.0002_auto_20210413_1116... OK
$ python manage.py migrate pk_migration zero
Operations to perform:
Unapply all migrations: pk_migration
Running migrations:
Rendering model states... DONE
Unapplying pk_migration.0002_auto_20210413_1116... OK
Unapplying pk_migration.0001_initial... OK
}}}
You could probably make it works with `SeparateDatabaseAndState()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/32634#comment:3>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/066.0b39ba9cfc1b1e3426b4f1521334dba8%40djangoproject.com.