'heroku no such table: auth_user error when trying to run create superuser

I'm trying to create my django app w/ Heroku however I'm stuck on this error. I have seen some information on heroku not being able to use sqllite so I've been trying to update to postgres but not sure why that's not reflected here.

sqlite3.OperationalError: no such table: auth_user

heroku run python3 manage.py createsuperuser

 ›   Warning: heroku update available from 7.41.0 to 7.60.1.
Running python3 manage.py createsuperuser on ⬢ generic-heroku-app... up, run.5883 (Free)
On development database

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: auth_user

DB from settings.py

import dj_database_url
db_from_env = dj_database_url.config(conn_max_age=600)
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': '**',
        'USER': '**',
        'PASSWORD': '**',
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}

Edit: this thread shows some solid info but I still can't seem to make it work with this info. Not sure where I'm going wrong.. "no such table" error on Heroku after django syncdb passed

Any help would be greatly appreciated!



Solution 1:[1]

If your project is connected with github deploy, then in your projeto, in Procfile, add:

release: python manage.py migrate
web: gunicorn myproject.wsgi

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lucas Moreira