anexia-it / django-rest-passwordreset

An extension of django rest framework, providing a configurable password reset strategy
BSD 3-Clause "New" or "Revised" License
419 stars 148 forks source link

UUID on user model not supported by migration #99

Open browze opened 4 years ago

browze commented 4 years ago

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.