OperationalError where it says that column userprofile_id and id are incompatible. Any suggestions?

Hello
I am trying to set up authorization through django api. I am also using machine to machine since I am going to set it up with BankID.

I have followed the documentation step by step and made sure I am logged in meanwhile, so the issuer and the audience is correct. However, I get this error when trying to run python manage.py migrate

I am using mysql as database
django.db.utils.OperationalError: (3780, “Referencing column ‘userprofile_id’ and referenced column ‘id’ in foreign key constraint ‘profiles_api_userpro_userprofile_id_c88d1a82_fk_profiles_’ are incompatible.”)

Any suggestions as to why?

Hey there @monhelle!

The most effective way to handle that I believe would be to raise a GitHub issue in the quickstart repo here:

Once you have a link to it you can share it here so we can ping the repo maintainers. Thanks!

1 Like

Thanks konrad! I think I found out the solution luckily. I changed the id to TextField instead of Bigint, now it works

1 Like

Perfect! Glad to hear that!