2 ms·
Show HN: DBWarden – A database migration tool for Python/SQLAlchemy projects
I built DBWarden for Python projects which use SQLAlchemy and need a simple migration workflow.
Most tools add large frameworks and complex configuration. DBWarden focuses on a small CLI and readable SQL migrations.
Core ideas
• Auto detect SQLAlchemy models from a models directory
• Generate raw SQL migration files from model changes
• Keep migrations transparent and easy to review
• Track migration history and database state
• Minimal setup through a small warden.toml file
Typical workflow
1. Write SQLAlchemy models
2. Run dbwarden make-migrations "name"
3. Review the generated SQL
4. Run dbwarden migrate
Commands include
• init
• make-migrations
• migrate and rollback
• history and status
• diff between models and database
Supported databases
• PostgreSQL
• SQLite
• MySQL
Project status: experimental. I look for feedback from developers who work with SQLAlchemy migrations.