From e03d578ef06f30b12bd513bbe706305daa2eea9b Mon Sep 17 00:00:00 2001 From: Eric Price Date: Sat, 6 Oct 2007 19:35:24 -0400 Subject: [PATCH] nics primary key should be mac address, not hostname. svn path=/trunk/packages/sipb-xen-database/sipb-xen-database/; revision=106 --- sipb_xen_database/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sipb_xen_database/models.py b/sipb_xen_database/models.py index cc4a7e9..4a6709e 100644 --- a/sipb_xen_database/models.py +++ b/sipb_xen_database/models.py @@ -31,9 +31,9 @@ machine_table = Table('machines', meta, nic_table = Table('nics', meta, Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=True), - Column('mac_addr', String, nullable=False), + Column('mac_addr', String, nullable=False, primary_key=True), Column('ip', String, nullable=False), - Column('hostname', String, primary_key=True, nullable=False)) + Column('hostname', String, nullable=True)) disk_table = Table('disks', meta, Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=False), -- 1.7.9.5