Skip to content

A pre-commit hook for the Alembic migration tool that ensures database migration integrity and best practices.

License

Notifications You must be signed in to change notification settings

phildp/alembic-check

Repository files navigation

alembic-check

codecov Ruff

A pre-commit hook for the Alembic migration tool that ensures database migration integrity and best practices.

Features

  • Validates Alembic migration files for common issues and best practices
  • Helps maintain a clean and consistent migration history
  • Easy integration with pre-commit framework
  • Extensible design for adding new validation rules

Installation

Add this to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/phildp/alembic-check
    rev: v0.1.0 # Use the latest release
    hooks:
      - id: alembic-check
        args: [src/config/alembic/migrations/] # Path to your migrations directory

Development

# Run tests
make test

# Run linting
make pre-commit

About

A pre-commit hook for the Alembic migration tool that ensures database migration integrity and best practices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published