Reputation: 1
I'm setting up my new website, but the web have some problem. It gives me an OperationalError
at /topics/
and no such table: toms_topic
.
This is a Heroku web dyno, running Django2.2 and Python 3.7.3.
I have executed
python manage.py migrate
and when I go to the db.sqlite
I find the table toms_topic
exists.
And everybody can goto the website https://cblingh.herokuapp.com for take more information
My last website haven't this problem,maybe I add image this time,and the image is foreignkey with topic.But i not sure it's the key of this problem yet.The topic have two foreignkey (entry,image).
Upvotes: 0
Views: 163
Reputation: 136958
You can't use SQLite on Heroku. Its filesystem is dyno-local and ephemeral. Any changes you make to it will be lost whenever your dyno restarts. This happens frequently (at least once per day).
Heroku offers good support for client-server databases. If you want to use Heroku you'll have to switch to one. Their own PostgreSQL service works well and is available out of the box. If you prefer other databases feel free to browse the data store addons.
Upvotes: 3