Error while switching the database from sqllite to postgre django

43 Views Asked by At

I changed the values of the DATABASE variable in the file settings.py to

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'postgres',
        'USER': 'postgres',
        'PASSWORD': 'password',
        'HOST': 'localhost',
        'PORT': "5432"

    }
}

but now after i run python manage.py migrate i'm getting the error

django.db.utils.ProgrammingError: column "name" of relation "django_content_type" does not exist

can someone tell what this error means and how to fix it

1

There are 1 best solutions below

0
baisbdhfug On BEST ANSWER

I figured it out. This occurred because i had to databases sharing the same name. If you came across the same error check that