[openstack-dev] [Ceilometer] Need help with Alembic...

Jay Pipes jaypipes at gmail.com
Mon Aug 26 17:34:05 UTC 2013

Hey all,

I'm trying to figure out what is going wrong with my code for this patch:


I had previously added a sqlalchemy-migrate migration script to add an 
event_type table, and had that working, but then was asked to instead 
use Alembic for migrations. So, I removed the sqlalchemy-migrate 
migration file and added an Alembic migration [1].

Unfortunately, I am getting the following error when running tests:

OperationalError: (OperationalError) table event_type already exists 
u'\nCREATE TABLE event_type (\n\tid INTEGER NOT NULL, \n\t"desc" 
VARCHAR(255), \n\tPRIMARY KEY (id), \n\tUNIQUE ("desc")\n)\n\n' ()

The migration adds the event_type table. I've seen this error occur 
before when using SQLite due to SQLite's ALTER TABLE statement not 
allowing the rename of a column. In the sqlalchemy-migrate migration, I 
had a specialized SQLite migration upgrade [2] and downgrade [3] script, 
but I'm not sure how I am supposed to handle this in Alembic. Could 
someone help me out?



More information about the OpenStack-dev mailing list