Changeset 2054 for trunk


Ignore:
Timestamp:
Jan 31, 2009, 3:59:00 AM (16 years ago)
Author:
broder
Message:

Conditionalize populating the types table in invirt-database-tables
based on whether the types are in the database already

Location:
trunk/packages/invirt-database-server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-database-server/debian/changelog

    r2053 r2054  
    11invirt-database-server (0.0.10) unstable; urgency=low
    22
     3  [ Greg Price ]
    34  * invirt-database-tables: populate types table
    45
    5  -- Greg Price <price@mit.edu>  Sat, 31 Jan 2009 03:49:33 -0500
     6  [ Evan Broder ]
     7  * Conditionalize populating the types table on the types not being there
     8    already.
     9
     10 -- Evan Broder <broder@mit.edu>  Sat, 31 Jan 2009 03:58:16 -0500
    611
    712invirt-database-server (0.0.9) unstable; urgency=low
  • trunk/packages/invirt-database-server/invirt-database-tables

    r2053 r2054  
    1515    session = database.session()
    1616    session.begin()
    17     session.save(database.Type(type_id='linux-hvm', description='HVM',
    18                                hvm='t', apic='t', acpi='t', pae='t'))
    19     session.save(database.Type(type_id='linux', description='ParaVM',
    20                                hvm='f', apic='f', acpi='f', pae='f'))
     17    if not database.Type.query.get('linux-hvm'):
     18        session.save(database.Type(type_id='linux-hvm', description='HVM',
     19                                   hvm='t', apic='t', acpi='t', pae='t'))
     20    if not database.Type.query.get('linux'):
     21        session.save(database.Type(type_id='linux', description='ParaVM',
     22                                   hvm='f', apic='f', acpi='f', pae='f'))
    2123    session.commit()
    2224
Note: See TracChangeset for help on using the changeset viewer.