You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run the test suite against Django 4.0a1, it'll fail on setup with the following message:
ValueError: Cannot alter field waffle.Flag.everyone into waffle.Flag.everyone -
they do not properly define db_type (are you using a badly-written custom field?)
The migration that fails is 0004_update_everyone_nullbooleanfield, which, rather embarrassingly, was added by me when Django dropped the NullBooleanField. (See commit 4e365fe).
It looks like the problem is caused by going from a NullBooleanField (no longer supported) to a BooleanField - which occurs in migration 0004. This situation would not occur in a mature codebase, where this migration has already been applied, however it does appear in test runs where the database is being set up, and will occur for anyone who adds django-waffle if to a Django 4+ project.
I believe the solution is to retrospectively edit the existing migrations to remove the NullBooleanField references. I'll submit a PR just to check it passes CI.
The text was updated successfully, but these errors were encountered:
@mrxsal Django 1.x has not been supported for quite some time. We cannot help you with those errors. You’ll need to either upgrade Django, or use an older version of Django-Waffle.
If you run the test suite against Django 4.0a1, it'll fail on setup with the following message:
The migration that fails is
0004_update_everyone_nullbooleanfield
, which, rather embarrassingly, was added by me when Django dropped theNullBooleanField
. (See commit 4e365fe).It looks like the problem is caused by going from a
NullBooleanField
(no longer supported) to aBooleanField
- which occurs in migration 0004. This situation would not occur in a mature codebase, where this migration has already been applied, however it does appear in test runs where the database is being set up, and will occur for anyone who addsdjango-waffle
if to a Django 4+ project.I believe the solution is to retrospectively edit the existing migrations to remove the
NullBooleanField
references. I'll submit a PR just to check it passes CI.The text was updated successfully, but these errors were encountered: