apologies in advance if this is a duplicate question. To the best of my searches, I was not able to find this question.
Using Django 2.0, I substituted the built-in django.contrib.auth with my own Users model, extending it with AbstractUser. The Users model is dependent on an existing table in MySQL, which is configured to work with Django. Django does not detect any issues when performing a check; however, I receive the following error:
OperationalError at / (1054, "Unknown column 'users.last_login' in 'field list'")
I added the column into the table thinking it would be a useful field to have, but was apprehensive because I figured I'd get another error for another missing field. Lo and behold:
OperationalError at / (1054, "Unknown column 'users.is_superuser' in 'field list'")
The point of substituting the user model is so I can ditch unimportant fields, such as "username". Do I just need to add each column to the table until I get all the auth fields in the table, or am I doing something fundamentally wrong?
TL;DR: How do I create a custom authentication method for Django using an existing table?