~sandy-walsh/nova/zones

« back to all changes in this revision

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

  • Committer: Sandy Walsh
  • Date: 2011-02-17 21:39:03 UTC
  • mfrom: (635.1.60 nova)
  • Revision ID: sandy.walsh@rackspace.com-20110217213903-swehe88wea8inxow
changed from 003-004 migration

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,