Tim O'Farrell f292f3a84d
V1 Integration (#11183)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2025-10-14 02:16:44 +00:00
..
2025-10-14 02:16:44 +00:00
2025-10-14 02:16:44 +00:00
2025-10-14 02:16:44 +00:00
2025-10-14 02:16:44 +00:00

# OpenHands App Server Alembic Integration

This alembic integration keeps the SQLite database up to date in single user deployments by managing schema migrations for app_server models. Migrations are applied automatically on startup.

## Configuration

Uses `DbSessionInjector` from `get_global_config()` for database connectivity and auto-detects models from the declarative base in `openhands.app_server.utils.sql_utils.Base`.

## Key Commands

Generate migration from model changes:
```bash
cd openhands/app_server/app_lifespan
alembic revision --autogenerate -m 'Sync DB with Models'
```