last_login field has removed from django user model

311 Views Asked by At

I am using django admin application. I just migrated jango 1.9 to Django 3.1.1. And Using python 3.6 During Django migration it would expects an additional arguments as "on_delete". So, I updated this arguments to all my models.

After modified models I just do "makemigrations" and "migrate" this all should fine without any issues. And, I could see that "last_login" column as missed in my table. When debugging I could see this in migrations file

operations = [
          migrations.RemoveField(
              model_name='user',
              name='last_login',
          )]

Questions

  1. Why this column has removed?
  2. How to add this field to user model again
0

There are 0 best solutions below