Better-SQLite3 Database Resetting After Restart On Heroku
I have a Discord bot with a better-sqlite3 database for coins and XP. It always worked fine until 2 weeks ago. Now, after every restart it just sets the XP and coins back. It's rea
Solution 1:
I would be very surprised if this ever worked properly.
Heroku's ephemeral filesystem loses all changes made to it whenever your dynos restart. This happens frequently (at least once per day). As a result, file-based databases like SQLite aren't supported on Heroku.
You'll have to switch to a client-server database if you want to run your code on Heroku. PostgreSQL is a common choice, and Heroku provides its own hosted PostgreSQL service that you can start using for free.
Post a Comment for "Better-SQLite3 Database Resetting After Restart On Heroku"