I am using Django version 2.0.2.
My Django application is connected to MS SQL
(connection below).
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'projectcreation',
'HOST': 'Host_name',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
'dns': 'projectcreation'
},
}
}
So, I am getting the following error when trying to access my Django application:
django.db.utils.ProgrammingError: ('42S02', "[42S02] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid object name 'projectcreation_partner'. (208) (SQLExecDirectW)")
I believe that when I created tables (makemigrations+migrate) instead of creating tables that look like this: [projectcreation].[dbo].[projectcreation_partner]
it created tables like this [projectcreation].[username].[projectcreation_partner]
. So instead putting dbo
which I actually expected to see it put my username..
I suppose that when the app tries to connect to db it cannot find it because it is looking for one containing dbo not username.. Of course, I could be wrong..
If you need more information please let me know, any help is greatly appreciated.
Note: both db and application are called "projectcreation", "partner" is name of one of the models.