I am trying to connect elephant sql service to django. I configured db settings in settings.py.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'test_db1',
'USER': 'xxxxx',
'PASSWORD': 'xxxxxxxxxxxxxxxxxxxx',
'HOST': 'arjuna.db.elephantsql.com',
'PORT': ''
}
}
But It gives an error when I make migrations.
RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': connection to server at "heffalump.db.elephantsql.com" (50.18.63.64), port 5432 failed: FATAL: no pg_hba.conf entry for host "123.231.123.61", user "hlcreaar", database "test_db2", SSL on
connection to server at "heffalump.db.elephantsql.com" (50.18.63.64), port 5432 failed: FATAL: no pg_hba.conf entry for host "123.231.123.61", user "hlcreaar", database "test_db2", SSL off
I tried adding port number 5432, but still it doesn't work. Can someone help me to fix this error?