~tpatil/nova/bug709510

« back to all changes in this revision

Viewing changes to nova/db/sqlalchemy/migration.py

  • Committer: Tarmac
  • Author(s): termie
  • Date: 2011-01-31 10:04:40 UTC
  • mfrom: (638.2.1 austin_migration)
  • Revision ID: tarmac-20110131100440-zrygi3nb3dxcptuf
Match the initial db version to the actual Austin release db schema.

Fixes: https://bugs.launchpad.net/nova/+bug/709183

Tested by copying nova/tests/db/nova.austin.sqlite to ./nova.sqlite and running ./bin/nova-manage db sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        meta.reflect(bind=engine)
47
47
        try:
48
48
            for table in ('auth_tokens', 'export_devices', 'fixed_ips',
49
 
                          'floating_ips', 'instances', 'iscsi_targets',
 
49
                          'floating_ips', 'instances',
50
50
                          'key_pairs', 'networks', 'projects', 'quotas',
51
 
                          'security_group_rules',
52
 
                          'security_group_instance_association', 'services',
 
51
                          'security_group_instance_association',
 
52
                          'security_group_rules', 'security_groups',
 
53
                          'services',
53
54
                          'users', 'user_project_association',
54
 
                          'user_project_role_association', 'volumes'):
 
55
                          'user_project_role_association',
 
56
                          'user_role_association',
 
57
                          'volumes'):
55
58
                assert table in meta.tables
56
59
            return db_version_control(1)
57
60
        except AssertionError: