make identity.last_used nullable and mark all debsso as last_used = NULL
Currenly all debsso identity are marked as last_used = 2020-04-15, which was the date the model was migrated and django set that value automatically.
To do:
-
make last_used nullable -
remove the auto_now_whatever flag from the field, so it's not set to the current date on creation -
update the middleware to keep the field properly updated
While looking at it, it was discovered that the field is only correctly managed by the OIDC provider, so:
-
move the last_used handling to a Provider hook, so each identity provider can handle it properly.