Answer the question
In order to leave comments, you need to log in
How to deploy a Telegram bot with a database?
I learned how to write telegram bots from lessons. I wrote a big bot with 2 databases on SQLite3 (the lessons were shown on YouTube from this database), now I want to deploy it, since the servers ask for either MySQL or PostgreSQL. If I knew that there were such problems with SQLite, I would immediately look for lessons with other databases.
I tried to find information on how to deploy with the SQLite database, but everyone only writes on it, and does not deploy.
I'm just learning and I can't figure out how to deploy a bot from such a database.
The database only writes data, I don't need to edit anything in it.
Perhaps there are ways to somehow deploy the bot without changing anything (just upload the files to the server so that the bot interacts with the database as with a file). If it would be more efficient to redo it, please tell me a resource where you can peep how it's done.
Answer the question
In order to leave comments, you need to log in
No need to despair! The underlying SQL queries will be the same for all specified DBMS.
I recommend treating it as an opportunity to work with another DBMS and rewrite the code. It will not be difficult and interesting.
You just chose the easiest database to deploy (SQLite). There you just need to transfer the baza.db file (baza.sqlite) to the server and that's it! sqlite3 comes by default in python, no need to install anything!
For example, MYSQL needs to be installed, set up root login, then create a user, give permissions, create a database, make a dump, load it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question