sqlalchemy / sqlalchemy/alembic

ensure version_locations can be modified in env.py, memoizations are reset, etc.

Open
#570 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

migration environment use case
Dominant language
Python
Stars
4.4k
Forks
375
PR merge metrics
No merged PRs in 30d

Description

Right now the dirname of the migrations path is hardcoded to versions. Would be great to have it configurable via the EnvironmentContext instead. It would allow to keep migration histories of several applications alongside each other in folder structure like migrations/app1/, migrations/app2/ etc. This would massively simplify migrations management in monorepo system architecture.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in env.py and trace how EnvironmentContext handles the migrations path and its version_locations setting. Check where the dirname is fixed to versions and how memoizations are managed. Done means applications can configure separate migration history directories such as migrations/app1/ and migrations/app2/, with related memoizations reset correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.