You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default migrations use model from AUTH_USER_MODEL, in my case its id is UUID. But I want to use pushes for model where id is integer. When I create new migration and try to apply it, I get such error:
django.db.utils.ProgrammingError: cannot cast type uuid to integer
LINE 1: ...ALTER COLUMN "user_id" TYPE integer USING "user_id"::integer
I found solution for me, but it is rather bad.
Then I looked at migrations files of django-push-notifications and see this row in push_notifications/migrations/0001_initial.py:
By default migrations use model from
AUTH_USER_MODEL
, in my case its id is UUID. But I want to use pushes for model where id is integer. When I create new migration and try to apply it, I get such error:I found solution for me, but it is rather bad.
Then I looked at migrations files of
django-push-notifications
and see this row in push_notifications/migrations/0001_initial.py:I'm not sure but isn't better to change kwarg
to
tosettings.PUSH_NOTIFICATIONS_SETTINGS["USER_MODEL"]
which is anyway AUTH_USER_MODEL by default?Environment:
The text was updated successfully, but these errors were encountered: