문제

I'm attempting to configure SQLAlchemy Alembic for my Pyramid project and I want to use my developement.ini (or production.ini) for the configuration settings for Alembic. Is it possible to specify the .ini file I wish to use anywhere within Alembic?

도움이 되었습니까?

해결책

Just specify alembic -c /some/path/to/another.ini when running alembic commands. You could even put the [alembic] section in your development.ini and production.ini files and just alembic -c production.ini upgrade head.

다른 팁

in many cases you can also use one shared alembic.ini and dynamically compute some parts somewhere else and interpolate them into the alembic.ini via %(VARIABLE)s replacements. see https://stackoverflow.com/a/55190497/2536029 for a complete description.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top