Migrations not working on azure with django

Luiz Godoy 0 Reputation points

I'm facing some problems with Django on my azure resource group. The landing page of my software is working fine, but when i try to log in, it does not work, and i get the error that it has ben caused by the "Accounts application"

relation "accounts_user" does not exist
LINE 1: ...s_user"."admin", "accounts_user"."timestamp" FROM "accounts_...

I've performed the migrations on the SSH, but i think that they are not being properly migrated, since even when i "Create a superuser" the user that i've just created does not work to log in and throw the same error.

SSH when i run python manage.py migrate:


Although the variables for the database seem to be sent correctly, as i can see on the local variables on the error:

 {'connection': <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7a01ddf85cc0>,
  'cursor': <django.db.backends.postgresql.base.CursorDebugWrapper object at 0x7a01d58667a0>})
<django.db.backends.postgresql.base.CursorDebugWrapper object at 0x7a01d58667a0>
('SELECT "accounts_user"."id", "accounts_user"."password", '
 '"accounts_user"."last_login", "accounts_user"."email", '
 '"accounts_user"."full_name", "accounts_user"."active", '
 '"accounts_user"."staff", "accounts_user"."admin", '
 '"accounts_user"."timestamp" FROM "accounts_user" WHERE '
 '"accounts_user"."email" = %s LIMIT 21')


{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.postgresql',
             'HOST': 'MY HOST NAME.postgres.database.azure.com',
             'NAME': 'MY DATABASE NAME',
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIGRATE': True,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': 'MY USERNAME'}}

Does anybody know what is can be?

Azure Database for PostgreSQL
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,022 questions
{count} votes