~sandy-walsh/nova/zones

« back to all changes in this revision

Viewing changes to nova/db/sqlalchemy/migrate_repo/versions/001_austin.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:
508
508
    # bind migrate_engine to your metadata
509
509
    meta.bind = migrate_engine
510
510
 
511
 
    for table in (auth_tokens, export_devices, fixed_ips, floating_ips,
512
 
                  instances, key_pairs, networks,
513
 
                  projects, quotas, security_groups, security_group_inst_assoc,
514
 
                  security_group_rules, services, users,
515
 
                  user_project_association, user_project_role_association,
516
 
                  user_role_association, volumes):
 
511
    tables = [auth_tokens,
 
512
              instances, key_pairs, networks, fixed_ips, floating_ips,
 
513
              quotas, security_groups, security_group_inst_assoc,
 
514
              security_group_rules, services, users, projects,
 
515
              user_project_association, user_project_role_association,
 
516
              user_role_association, volumes, export_devices]
 
517
    for table in tables:
517
518
        try:
518
519
            table.create()
519
520
        except Exception:
520
521
            logging.info(repr(table))
521
522
            logging.exception('Exception while creating table')
 
523
            meta.drop_all(tables=tables)
522
524
            raise
523
525
 
524
526