Django is using primary keys ints and foreign keys bigint. How do I solve this?

Hello.
The thing is that when I was making the database ER schema I noticed that the primary keys are int meanwhile the foreign keys are BigInt. I’ve tried to solve it using in the settings.py file the parameter DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' but the migration didn’t reflect any changes.
I don’t know how to do this manually for more than 50 tables or using a PostgreSQL script to do so, and even if I knew a method, I can’t access the tables in psql using the django credentials because it says “the role doesn’t exist”, so, how do I do this? Any help will be appreciated.
I’m using Django 3.2 an PostgreSQL 15.1

Probably the easiest thing to do would be to drop and recreate the database, then rerun the migrations.

:sob: :sob: :sob: Yes, I was afraid of that, but it seems to be the way. The thing is I don’t know how to do that because I can’t connect to the database using psql.

That’s a different issue, and not really related to Django. If you can’t do that, then there are likely other problems involved. How did you create the database in the first place?

I’ve created the database using the makemigrations/migrate.
The thing is, when I use postgreSQL, it tells me the database doesn’t exist, which is a complete mistery to me (I’m sorry, I’m completely new on this) because the server runs and list things my colleagues loaded. I’ve already asked them and I’m waiting for an answer.
Thanks for your replies.