Hi,
I'm working on upgrading the installed apps/dependencies of a djangae project that I haven't touched in about 2 years, where I have upgraded django>=1.8,<1.9 to django>=1.11.19,<2.0.
Throughout this upgrade, I have replaced the installed app 'djangae.contrib.gauth.sql' to 'djangae.contrib.gauth_sql'. In the settings.py file, I had the AUTH_USER_MODEL set to 'djangae.GaeUser', and my SQL database currently contains the tables djangae_gaeuser, djangae_gaeuser_groups, and djangae_gaeuser_user_permissions.
Without updating the value of AUTH_USER_MODEL, I get the following error:
"AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.AUTH_USER_MODEL
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'djangae.GaeUser' that has not been installed
I then switched the value to 'gauth_sql.GaeUser', and the server starts. However, whenever I open a view that queries the database, I get the following error:
ProgrammingError: (1146, "Table 'my_app.gauth_sql_gaeuser' doesn't exist")
I then created a new model in models.py called GaeUser:
class GaeUser(djangae.contrib.gauth_sql.models.GaeAbstractUser):
class Meta:
db_table = 'djangae_gaeuser'
and updated the value of AUTH_USER_MODEL to 'my_app.GaeUser'. When running the server and opening a view that queries the database, I get the following error:
OperationalError: (1054, "Unknown column 'djangae_gaeuser.email_lower' in 'field list'")
I was looking at
https://code.djangoproject.com/ticket/25313, but it seems that the solution suggested in there applies to migrating from auth.User to a custom User class, rather than migrating from djangae.GaeUser to a a custom User class that extends djangae.contrib.gauth_sql.models.GaeAbstractUser.
I feel like I'm getting close to fixing this issue, but I'm not quite sure if I will be required to perform some sort of migration and/or restructuring the SQL database to reflect the correct naming for the user database.
Any advice would be appreciated!
Thanks