Closed woile closed 2 months ago
Yes, sorry about that :roll_eyes:
I was trying to address some problems related to some Mysql users (#21) by isolating the constraint in its own migration. So it can be skipped when the constraint could not be applied to the database.
Unfortunately, I also modified the previous migrations (to not include the constraint creation), but I didn’t modify those migration names (bad idea, I should not repeat it).
So, it’s working well from an empty database doing all the migrations, but yes, for an upgrade it fails :disappointed:
There is a solution though: just skip the migration (as you already have the constraint anyway)
$ python -m django migrate --fake oauth2_authcodeflow 0004
$ python -m django migrate
I can publish another version to pypi allowing the migration to fail successfully when the constraint already exist.
It seems a migration was renamed and there are issues now: I have this migration from previous version
0004_alter_blacklistedtoken_id_and_more
, and now it's called0004_blacklistedtoken_constraint.py
.It creates the following error:
Any idea how to fix it?