Hi all,

I uses Travis-CI pour automatic tests of my Turbogears Application. The 
build fails because tests fail, because Alembic migration is not applied.

On local development box, running *gearbox migrate upgrade* is ok.
But running with test.ini configuration - *gearbox migrate -c test.ini 
upgrade* returns the following output :

(venv)root@ulysse:/tmp/tracim_repo/tracim# gearbox migrate -c test.ini 
upgrade
18:25:21,451 INFO  [alembic.migration] Context impl PostgresqlImpl.
18:25:21,451 INFO  [alembic.migration] Will assume transactional DDL.

The patch is not applied.

What is the way to apply alambic upgrade for test environment ?

Note : according to the documentation - 
http://turbogears.readthedocs.org/en/latest/turbogears/migrations.html, I 
added to setup-app the following lines at the end of the setup_schema() 
function (the code is executed - I tested it with some debug printing) : 


import alembic.config, alembic.command
alembic_cfg = alembic.config.Config()
alembic_cfg.set_main_option("script_location", "migration")
alembic_cfg.set_main_option("sqlalchemy.url", config['sqlalchemy.url'])
alembic.command.stamp(alembic_cfg, "head")

Note : I'm working with turbogears 2.4

Thanks for your help

Damien

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to