Re: How to configure multiple databases

2014-05-13 Thread Charles Reese
Hi Mike, I can't use ini files because I don't know which database to use until the test is running. However, I was able to solve via tags. On Mon, May 12, 2014 at 8:52 PM, Michael Bayer wrote: > > there's no standard per se. I'm partial to .ini files and in particular a > test.ini file for te

Re: How to configure multiple databases

2014-05-12 Thread Michael Bayer
there's no standard per se. I'm partial to .ini files and in particular a test.ini file for tests. Environment variables are another option. The app overall needs a way to differentiate database urls for tests vs. running normally, so migrations aren't special. The migration environment

How to configure multiple databases

2014-05-12 Thread Charles Reese
I need to specify different databases for different configurations, one for running migrations, one for units tests, one for Jenkins... Here is what I currently do: alembic/env.py: def run_migrations_online(): engine = create_engine( create_app('settings.yaml').config['DATABASE_URL'