0

I'm having trouble migrating my database and creating authentication tables to my application's database for superusers, staff, etc. which has to be done by performing python manage.py migrate. I believe my problems are occuring because I'm using legacy databases hosted on a Microsoft SQL Server instance, but I'm not sure and I might just have some things set up wrong.

I expect to connect to the database and add an admin/authentication table to an existing database ('authentication_database'), however I receive the following error message:

django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

It should be noted that I can access the client_database's ORM via interactive shell/custom management commands. I simply can not migrate the database.

Here is my DATABASES setting in settings.py:

DATABASES = {
    'default': {},
    'auth_db': {
        'NAME': 'authentication_database',
        'HOST': 'host.ip.address.yo',
        'PORT': '',
        'ENGINE': 'sql_server.pyodbc',
        'OPTIONS': {
            'driver': 'SQL Server Native Client 11.0',
        },
    },
    'client_database': {
        'NAME': 'client_database',
        'HOST': 'host.ip.address.yo',
        'PORT': '',
        'ENGINE': 'sql_server.pyodbc',
        'OPTIONS': {
            'driver': 'SQL Server Native Client 11.0',
        },
    },
}

# Database routers
DATABASE_ROUTERS = ['app_name.dbrouter.ClientRouter', 'project_name.authrouter.AuthRouter']

DATABASE_CONNECTION_POOLING = False

I can provide my auth routing code if that could help.

I can also provide a full stack trace if that will help. I just don't currently wish to edit out identifying information in the meantime. Thanks!~

dmcoding
  • 332
  • 4
  • 18

0 Answers0