ProgrammingError at / after depploying my django project to heroku but wotking well on local host
I have made all the migrations as recommended in previous posts. I have also updated my settings.py as recommended inj previous posts. here is my console message;
2022-10-13T22:36:21.289647+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
2022-10-13T22:36:21.289648+00:00 app[web.1]: with self.db.wrap_database_errors: 2022-10-13T22:36:21.289648+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/django/db/utils.py", line 91, in exit 2022-10-13T22:36:21.289648+00:00 app[web.1]: raise dj_exc_value.with_traceback(traceback) from exc_value 2022-10-13T22:36:21.289648+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute 2022-10-13T22:36:21.289648+00:00 app[web.1]: return self.cursor.execute(sql, params) 2022-10-13T22:36:21.289648+00:00 app[web.1]: django.db.utils.ProgrammingError: relation "freelanceapp_post" does not exist 2022-10-13T22:36:21.289648+00:00 app[web.1]: LINE 1: ...t"."slug", "freelanceapp_post"."category_id" FROM "freelance... 2022-10-13T22:36:21.289648+00:00 app[web.1]: ^ 2022-10-13T22:36:21.289649+00:00 app[web.1]: 2022-10-13T22:36:21.290265+00:00 app[web.1]: 10.1.23.15 - - [13/Oct/2022:22:36:21 +0000] "GET / HTTP/1.1" 500 196793 "https://dashboard.heroku.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" 2022-10-13T22:36:21.289879+00:00 heroku[router]: at=info method=GET path="/" host=victorkiprono.herokuapp.com request_id=b9f45047-6c65-44e5-975d-b0f71a4c023b fwd="105.161.25.118" dyno=web.1 connect=0ms service=133ms status=500 bytes=197110 protocol=https
It has finally worked. I ran this command;
python manage.py migrate --run-syncdb
And the output was as shown below:
Operations to perform: Synchronize unmigrated apps: freelanceapp, messages, profiles, staticfiles Apply all migrations: admin, auth, contenttypes, sessions Synchronizing apps without migrations: Creating tables... Creating table freelanceapp_post Creating table freelanceapp_category Creating table profiles_userprofile Running deferred SQL... Running migrations: No migrations to apply.
Thank you all for your responses.