I am trying to make a Django app to connect to an existing RDS postgres instance
I have changed my settings.py file to the following:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': <db-name>,
'USER': <username>,
'PASSWORD': <pswd>,
'HOST': 'project-hash.us-east-1.rds.amazonaws.com',
'PORT': '5432',
}
}
After creating Django project, running python manage.py migrate yelds:
Tracking file by folder pattern: migrations
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying auth.0001_initial...Traceback (most recent call last):
File "/home/gustavo.figueiredo/anaconda3/envs/lp_admin/lib/python3.7/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
psycopg2.errors.DuplicateTable: relation "auth_permission" already exists
NAMEshould be different)