Friday, 9 August 2013

Strange behaviour when subclassing AbstractUser

Strange behaviour when subclassing AbstractUser

I think there is a bug in South. I subclassed AbstractUser in my app and
set AUTH_USER_MODEL in settings.py to point to that User class. Upon
running syncdb without south you can see that some of the fields in user
table are nullable:

But when I enable south and do schemamigration --initial, syncdb and
migrate then all of the fields in user table are not nullable:

This gives me the following error when creating superuser with manage
createsuperuser:
IntegrityError: ORA-01400: cannot insert NULL into
("TEST"."MYAPP_USER"."FIRST_NAME")

No comments:

Post a Comment