-1

After hours of watching tutorials and reviewing the documentations of django and heroku, i finally deployed my simple django web application. For the database part, i came to know about an issue using sqlite database as default database for production. I fear that i lose my records after deploying the application once done, as said by heroku themselves.

I am currently having one user, who post posts and announcements in the website and public viewers can only view it. My question is, is it correct to use sqlite database for production or will the free postgres database be enough for what i am doing with?

Alasdair
  • 298,606
  • 55
  • 578
  • 516
Mowli sri
  • 71
  • 1
  • 8
  • Hey, check this out: https://stackoverflow.com/questions/913067/sqlite-as-a-production-database-for-a-low-traffic-site – Leogout Jul 19 '19 at 09:42
  • Yes it's a possible duplicate of the quetion. It gave me the idea of using different databases for different purpose. But my question is whether heroku deletes the database automatically? – Mowli sri Jul 19 '19 at 09:51
  • You can't use sqlite3 on Heroku. See the linked question, and also [this article](https://devcenter.heroku.com/articles/sqlite3) from the Heroku site. – Alasdair Jul 19 '19 at 10:09

1 Answers1

0

Personnaly i prefer using a robust database for production as mysql or postgresql cause sqlite is only for development purpose and it is not dedicated for the prod environment, think about the fact that you may have many users and data in the future ans it will be so difficult to migrate it from sqlite to another database so it is better to do it now.

Farhani Walid
  • 927
  • 1
  • 9
  • 20
  • Actually, my website don't hold multiple users. I am the only one who can actually write data(post contents). Others can just view the posts. So will this mean sqlite is good for my website production stage? – Mowli sri Jul 19 '19 at 09:50
  • If it is the case it may do the job but like i have said you may want to have something robbust from the begging cause even if users will only read from the database if you will have many traffic into your web app it will slow the the response between the user and the db. – Farhani Walid Jul 19 '19 at 09:56