lily_website

πŸ“œ README

⬅️ Back 🏠 Docs Root

This README file provides essential information and commands for managing database migrations for the Telegram Bot when it operates in β€œdirect” data mode (i.e., when the bot has its own database).

Purpose

It clarifies that these migrations are only relevant when BOT_DATA_MODE=direct and that in api mode, the bot interacts with a backend via REST, without direct database access.

Commands

The README outlines key Alembic commands for managing migrations:

Schema Isolation

The documentation highlights that the bot uses a dedicated PostgreSQL schema named bot_app (configurable via the DB_SCHEMA environment variable). This approach enables sharing a single database instance (e.g., Neon) with other backend services like Django or FastAPI, while maintaining schema separation.