X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/a63c9130969c412fb859f06e4c35098d68adaa44..4bf49a9cd6dbf307fe918e9ce349bd1c62b1535c:/python/database/models.py diff --git a/python/database/models.py b/python/database/models.py index e44aff3..f3d36e9 100644 --- a/python/database/models.py +++ b/python/database/models.py @@ -79,7 +79,8 @@ autoinstalls_table = Table('autoinstalls', meta, Column('description', String, nullable=False), Column('type_id', String, ForeignKey('types.type_id'), nullable=False), Column('distribution', String, nullable=False), - Column('mirror', String, nullable=False)) + Column('mirror', String, nullable=False), + Column('arch', String, nullable=False)) machine_access_table = Table('machine_access', meta, Column('machine_id', Integer, ForeignKey('machines.machine_id', ondelete='CASCADE'), nullable=False, index=True), @@ -128,7 +129,8 @@ session.mapper(NIC, nic_table) session.mapper(Disk, disk_table) session.mapper(Type, types_table) session.mapper(Mirror, mirrors_table) -session.mapper(CDROM, cdroms_table) +session.mapper(CDROM, cdroms_table, + properties={'mirror': relation(Mirror, backref="cdroms")}) session.mapper(Autoinstall, autoinstalls_table) def clear_cache():