Open MatthewWilkes opened 5 years ago
The uses cases where I need alembic are:
pipenv run alembic -c etc/development.ini -n app:main upgrade head
and similar.If we can cover all these three, I'm huge +1 for not requiring users of pyramid_deferred_sqla from doing what is proposed in https://github.com/niteoweb/pyramid-realworld-example-app/pull/22.
Yeah, as soon as I started looking at this I started not liking my solution for 22. I think I'm going to build some helper functions in here and tear that out again.
@MatthewWilkes: This one can be closed, right?
The readme says to call
config.alembic_config
to set up alembic, but it doesn't actually set up alembic. what it does is returns an alembic configuration object that has thescript_location
main value set, as well as the DB value that's in the current configurator.It's nice to have a function that creates the alembic configuration, as we've seen in https://github.com/niteoweb/pyramid-realworld-example-app/pull/22 that it can be a bit messy having to create the alembic config. I think it would be nicer if that code was in this package, if at all possible.
The problem, as I see it, is that making this a directive of the Configurator means that it is available at configuration time only, which isn't especially convenient for either testing or standalone alembic invocations.
Am I interpreting the intention of this directive correctly, and do people agree that it should be possible to create an alembic Config without first creating a Pyramid Configurator?