# Deployment to heroku gives Database Errors.

**URL:** <https://forum.djangoproject.com/t/deployment-to-heroku-gives-database-errors/11492>\
**Category:** Using Django\
**Created:** [January 11, 2022, 12:54am UTC](https://forum.djangoproject.com/t/deployment-to-heroku-gives-database-errors/11492 "2022-01-11T00:54:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![enjoysmath](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/enjoysmath/32/5923_2.png) [@enjoysmath](https://forum.djangoproject.com/u/enjoysmath)\
**Post date:** [January 11, 2022, 12:54am UTC](https://forum.djangoproject.com/t/deployment-to-heroku-gives-database-errors/11492/1 "2022-01-11T00:54:08Z")

</div>

I followed this article to deploy:

[Web article](https://medium.com/@shashankmohabia/deploying-a-django-app-to-heroku-using-github-repository-319c04a11c1a)

I’m getting an error:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/6/63a156e56900e22a112c68fac55e5c195ae4b78d.png)

Just try creating a user, on the frontpage, here:

abstract-spacecraft DOT herokuapp DOT com

I used weird notation because of this spam filter here.

I think this is with either SQLite or PostgreSQL options. Do I need to additionally run the Django migration tool on heroku over command line as well?

I posted an image because previously, my post got blocked as spam, when I tried pasting the full error text + my settings.py.

The full code can be found here:

[Github repository](https://github.com/enjoysmath/abstract_spacecraft)

---

<div class="post-metadata">

**Author:** ![enjoysmath](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/enjoysmath/32/5923_2.png) [@enjoysmath](https://forum.djangoproject.com/u/enjoysmath)\
**Post date:** [January 11, 2022, 1:07am UTC](https://forum.djangoproject.com/t/deployment-to-heroku-gives-database-errors/11492/2 "2022-01-11T01:07:31Z")

</div>

Was able to fix it (for SQLite) using:

`heroku run python manage.py migrate --app my_app_name`

Anyway to do this automatically with each deploy?
