If you look at the pyramid-cookiecutter-starter [1] the integration modifies the env.py file to load the url from the app settings instead of the alembic section of the ini. This allows you to put a copy-pasta [alembic] section into the file which points at the migrations/slug format/etc and sources the url from elsewhere.
Maybe someone else has something better, but that's what we're using right now. [1] https://github.com/Pylons/pyramid-cookiecutter-starter/blob/41a23afa7e05958f53100a31dfd8aaabaeab67e9/%7B%7Bcookiecutter.repo_name%7D%7D/%7B%7Bcookiecutter.repo_name%7D%7D/sqlalchemy_alembic/env.py On Wed, Feb 5, 2020 at 11:43 AM Jonathan Vanasco <jonat...@findmeon.com> wrote: > I'd like to integrate Alembic into a project that is mostly driven by the > Pyramid framework. > > In my use-case, Pyramid is driven by two or more different configuration > files, such as: > > example_development.ini > example_production.ini > > The relevant difference between them is the sqlalchemy url - which can > point to different databases and even different database drivers. Then > there are the test systems. > > What is the most-correct/easiest/best way of integrating alembic in this > situation? > > Is it possible to somehow declare the sqlalchemy url in the my pyramid > .ini files, then have a single simple alembic file reference that? > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy-alembic" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy-alembic+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy-alembic/9258400f-d23b-4c92-856e-cba8c74dacf6%40googlegroups.com > <https://groups.google.com/d/msgid/sqlalchemy-alembic/9258400f-d23b-4c92-856e-cba8c74dacf6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Michael -- You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy-alembic/CAKdhhwESaod2-bfbS7As0r-S2hruio3JANPS74CB%3Dofx0VDaHg%40mail.gmail.com.