Problem with django migration / django.db.utils.ProgrammingError: invalid dsn: invalid connection option "players"
i am facing a problem when trying to migrate my project to docker postgres db!
Error is:
File "D:\TeamsProject.venv\Lib\site-packages\psycopg2_init_.py", line 121, in connect dsn = _ext.make_dsn(dsn, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\TeamsProject.venv\Lib\site-packages\psycopg2\extensions.py", line 167, in make_dsn parse_dsn(dsn) django.db.utils.ProgrammingError: invalid dsn: invalid connection option "players"
INSTALLED_APPS = [
'unfold',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'teams',
'players',
'matches',
'common',
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': config('DB_NAME'),
'USER': config('DB_USER'),
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST', default='localhost'),
'PORT': config('DB_PORT', default='5432'),
},
}
More context:
I have an app named players
with a model Player
in it.
DB configuration in settings.py
was checked 100 times.
Also tried manually to connect with DB through Docker commands, and it works fine.
I cannot understand where this problem is coming from...
Checked all the code for some typos, checked db settings, reinstalled decouple and psycopg2 and 100 more things.