Skip to content

v0.1.4 - Database Migrations with Alembic

Choose a tag to compare

@l0kifs l0kifs released this 14 Dec 07:57
· 7 commits to main since this release

What's New

Added

  • Automatic database migrations using Alembic for SQLAlchemy models
  • Migration utilities (src/task_context_mcp/database/migrations.py) for programmatic control:
    • Creating new migrations
    • Applying migrations
    • Downgrading migrations
    • Retrieving current database revision
  • Initial Alembic migration script to capture current schema
  • Comprehensive documentation in `docs/MIGRATIONS.md` covering:
    • Migration usage and workflow
    • Best practices
    • Troubleshooting
  • Enhanced test coverage with migration utilities and workflow tests

Changed

  • `DatabaseManager.init_db()` now runs Alembic migrations automatically for file-based databases
  • Falls back to direct table creation for in-memory SQLite databases (tests)
  • Updated `README.md` with migration information and references

Fixed

  • Ensured in-memory SQLite test compatibility by creating tables directly during tests
  • All tests passing after migration integration

Full Changelog: v0.1.3...v0.1.4