Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PostgreSQL support to the bot stack #30

Closed
6 tasks done
obervinov opened this issue Nov 7, 2023 · 0 comments · Fixed by #37
Closed
6 tasks done

Add PostgreSQL support to the bot stack #30

obervinov opened this issue Nov 7, 2023 · 0 comments · Fixed by #37
Assignees
Labels
enhancement New feature or request

Comments

@obervinov
Copy link
Owner

obervinov commented Nov 7, 2023

DB Tables:
queue: messages received by the bot are placed in this table for further processing at the specified time by a separate thread

  • id (int)
  • user id (int)
  • post url (str)
  • post id (str)
  • scheduled_time (datetime)
  • timestamp (datetime)
  • post owner (str)
  • message id (str)
  • chat id (str)
  • link type (post or profile) (str)
  • state (str)

processed: historical data from vault should be migrated here and after processing from queue, the record should be moved to this table, enriched with additional data

  • id (int)
  • queue id (str)
  • user id (str)
  • post url (str)
  • post id (str)
  • timestamp (datetime)
  • download status (str)
  • upload status (str)
  • post owner (str)

migrations: table for service migrations (for example, transferring historical data from vault)

  • id (str)
  • name (str)
  • version (str)
  • completion time (datetime)

To-Do:

  • Write migration of historical data from vault to postgresql
    • migration should leave a mark in the migrations table after completion
    • the migration shouldn’t delete the migrated data in the vault
  • The bot should automatically create tables in the database at startup
  • The configuration of the database connection must be stored and read by the vault
  • To work with a database, you need to create a separate class with a set of methods and attributes for interacting with tables
@obervinov obervinov converted this from a draft issue Nov 7, 2023
@obervinov obervinov self-assigned this Nov 7, 2023
@obervinov obervinov added the enhancement New feature or request label Nov 7, 2023
@obervinov obervinov added this to the release/v2.1.0 milestone Nov 7, 2023
@obervinov obervinov moved this from Todo to In Progress in @obervinov's Pyinstabot-Downloader Nov 7, 2023
obervinov pushed a commit that referenced this issue May 28, 2024
…`rate limits`, `queue` and code refactoring (#37)

## v2.1.0 - 2024-05-28
### What's Changed
**Full Changelog**: v2.0.0...v2.1.0 by @obervinov in #37
#### 🐛 Bug Fixes
* #23
#### 📚 Documentation
* #26
* Update repository issues template
#### 💥 Breaking Changes
* Add `PostgreSQL` support to the bot stack instead of `Vault`. All bot data except `configurations` and `user data` is now stored in the database.
* Remove outdated method for processing full account data per link of `user profile`.
* Move all configuration of components form `environment variables` to the `Vault`.
#### 🚀 Features
* #54
* #32
* #30
* #28
* #14
* #20
* #27
* #24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
1 participant