Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUID on user model not supported by migration #99

Closed
browze opened this issue Jun 13, 2020 · 1 comment
Closed

UUID on user model not supported by migration #99

browze opened this issue Jun 13, 2020 · 1 comment

Comments

@browze
Copy link

browze commented Jun 13, 2020

It would appear that your migration assumes an auto increment id field is in use for the user model.

The following error is generated when a UUID is used:

Applying django_rest_passwordreset.0001_initial...Traceback (most recent call last): File "/Users/harry/apps/jt/jt_env/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) psycopg2.errors.DatatypeMismatch: foreign key constraint "django_rest_password_user_id_e8015b11_fk_core_pers" cannot be implemented DETAIL: Key columns "user_id" and "id" are of incompatible types: uuid and integer.

@anx-abruckner
Copy link
Collaborator

I know it's an old issue, but a testapp to cover this usecase was added - the tests seem to work without problem, see PR 198 .
Hence this issue will be closed.

nezhar added a commit that referenced this issue Nov 5, 2024
Test cases for issue #99 (UUID as user model primary key field)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants