This is a simple example application demonstrating Alembic database migrations for testing the OpenMindUA/alembic-actions GitHub workflow.
.
├── app/
│ ├── models/
│ │ ├── __init__.py
│ │ └── user.py # User SQLAlchemy model
│ ├── __init__.py
│ └── database.py # SQLAlchemy database configuration
├── migrations/ # Alembic migrations directory
├── alembic.ini # Alembic configuration
├── README.md
└── requirements.txt # Python dependencies
-
Create a virtual environment and install dependencies:
uv venv source .venv/bin/activate uv pip install -r requirements.txt -
Run migrations:
alembic upgrade head
- Initial migration creates the
userstable - Additional migrations can be added to demonstrate schema changes
This repository is designed to test the functionality of the OpenMindUA/alembic-actions GitHub workflow, which automates checks for Alembic migrations during pull requests.
This repository demonstrates the use of two complementary GitHub Actions from the OpenMindUA/alembic-actions repository:
-
alembic-review: Code review focused validation (workflow)
- Checks revision files existence and formatting
- Verifies migration ordering
- Quick validation ideal for PR reviews
- See detailed guide
-
alembic-test: Comprehensive migration testing (workflow)
- Runs migrations against a test database
- Tests all upgrade and downgrade paths
- Validates model definitions
- See detailed guide
-
Migration application workflow: Example of applying migrations (workflow)
- Demonstrates how to safely apply migrations in a CI/CD pipeline
- Includes validation before applying
- Shows notification patterns for team communication