- Arkhangelsk, Russia
- https://skobk.in
- Joined on
2022-03-02
If this method doesn't handle user's subscription to the feed than we should have somethig like def subscribe_user(user_id: int, feed_id: int)
and def unsubscribe_user(user_id: int, feed_id: int)
.
We forgot about get_user()
method. So we should implement it too 🤷♂️
We'd better have database path passed as an argument of constructor than just hardcode it here.
I think we'll have not only subscribers data in this database, so it's pretty safe to just call it something like database.db
/bot.db
/database.sqlite
.
It'll most likely cause an error on the second run because the table was already created earlier
I'm not sure if we need a Singleton here at all. We'll better handle database connections using direct injections into class constructors other than just calling them in the middle of the class method.
@Miroslavsckaya we also need to have migrations to be able to properly develop the project as a team. So I've created #16 for you. You can implement that after imlementing a draft of this task.
@Miroslavsckaya, let's use SQLite in MVP to save time. I'll create another ticket for PostgreSQL migration.