-
-
Notifications
You must be signed in to change notification settings - Fork 310
Description
Alembic uses __file__ to locate both templates and migrations on disk and, although Alembic ostensibly appears to support in-package migration environments [1], it attempts to resolve the script_location on disk. This reliance on __file__ makes embedding Alembic in freezers and ZIP apps difficult. Are there plans to support the new resource API for reading templates and migrations contained in packages going forward, which would allow loading resources from memory?
[1]
For support of applications that package themselves into .egg files, the value can also be specified as a package resource, in which case resource_filename() is used to find the file (new in 0.2.2). Any non-absolute URI which contains colons is interpreted here as a resource name, rather than a straight filename.
https://alembic.sqlalchemy.org/en/latest/tutorial.html?highlight=script_location