Skip to content

Alembic Part 1#177

Merged
lbedner merged 1 commit intomainfrom
alembic-part-1
Sep 19, 2025
Merged

Alembic Part 1#177
lbedner merged 1 commit intomainfrom
alembic-part-1

Conversation

@lbedner
Copy link
Copy Markdown
Owner

@lbedner lbedner commented Sep 19, 2025

First part of alembic integation.

Copilot AI review requested due to automatic review settings September 19, 2025 21:37
@lbedner lbedner self-assigned this Sep 19, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements Alembic database migration support for the Aegis Stack, specifically for projects that include authentication services. The integration provides a complete migration framework with initial auth schema setup and automated project initialization.

  • Adds Alembic dependency and configuration files for database migration management
  • Updates database initialization to support migration-based schema management for auth services
  • Enhances project generation with automated dependency installation, environment setup, and database migration execution

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pyproject.toml.j2 Adds alembic dependency to projects with database components
database_init.py.j2 Updates startup logic to handle migration-based vs direct table creation
models.py.j2 Conditionally imports datetime/pydantic dependencies based on component selection
auth/router.py Fixes OAuth2 token URL to use full API path
001_initial_auth.py.j2 Initial Alembic migration for auth schema creation
script.py.mako Alembic migration template for generating new migrations
env.py.j2 Alembic environment configuration with SQLModel integration
alembic.ini.j2 Standard Alembic configuration file
Makefile Adds database migration management commands
post_gen_project.py Implements automated project setup with dependency installation and migrations
cookiecutter.json Adds internal variable for migration inclusion logic
init.py Updates project creation to use pre-removal strategy for force overwrite

@lbedner lbedner merged commit 2bdcc01 into main Sep 19, 2025
7 checks passed
@lbedner lbedner deleted the alembic-part-1 branch September 19, 2025 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate Alembic for database migrations Fix immediate auth service database initialization

2 participants