./manage.py migrate oauth2_authcodeflow zero
File "/Users/pinoatrome/.virtualenvs/my-project/lib/python3.11/site-packages/django/db/migrations/migration.py", line 159, in unapply
raise IrreversibleError(
django.db.migrations.exceptions.IrreversibleError: Operation <RunPython <function forwards at 0x108c94680>> in oauth2_authcodeflow.0003_auto_20210528_1432 is not reversible
This is because some migrations use RunPython with only forward function, missing reverse function.
"The reverse_code argument is called when unapplying migrations. This callable should undo what is done in the code callable so that the migration is reversible. If reverse_code is None (the default), the RunPython operation is irreversible."
The unapply operation of migrations fails:
This is because some migrations use RunPython with only forward function, missing reverse function.
From docs on RunPython
"The reverse_code argument is called when unapplying migrations. This callable should undo what is done in the code callable so that the migration is reversible. If reverse_code is None (the default), the RunPython operation is irreversible."