~citrix-openstack/nova/xenapi

« back to all changes in this revision

Viewing changes to nova/db/sqlalchemy/migrate_repo/versions/002_bexar.py

  • Committer: rlane at wikimedia
  • Date: 2011-03-03 23:04:11 UTC
  • mfrom: (408.9.363 nova)
  • mto: (408.9.366 nova)
  • mto: This revision was merged to the branch mainline in revision 449.
  • Revision ID: rlane@wikimedia.org-20110303230411-qx4qndimfyr1w1fx
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
    # Upgrade operations go here. Don't create your own engine;
210
210
    # bind migrate_engine to your metadata
211
211
    meta.bind = migrate_engine
212
 
    for table in (certificates, consoles, console_pools, instance_actions,
213
 
                  iscsi_targets):
 
212
 
 
213
    tables = [certificates, console_pools, consoles, instance_actions,
 
214
              iscsi_targets]
 
215
    for table in tables:
214
216
        try:
215
217
            table.create()
216
218
        except Exception:
217
219
            logging.info(repr(table))
218
220
            logging.exception('Exception while creating table')
 
221
            meta.drop_all(tables=tables)
219
222
            raise
220
223
 
221
224
    auth_tokens.c.user_id.alter(type=String(length=255,