From 76dd52dcc0e221aa2ffcf3f4ce874ed9a3130ae1 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Tue, 17 Feb 2009 03:45:24 -0500 Subject: [PATCH] Make the default values in the owners class explicit. svn path=/trunk/packages/invirt-database/; revision=2150 --- debian/changelog | 8 ++++++++ python/database/models.py | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1bd0299..89967fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +invirt-database (0.1.5) unstable; urgency=low + + * Make the default values on the owners table explicit + (Note: This is a NOOP, since a nullable field with no otherwise + specified default defaults to NULL) + + -- Evan Broder Tue, 17 Feb 2009 03:36:47 -0500 + invirt-database (0.1.4) unstable; urgency=low * minor bug fix diff --git a/python/database/models.py b/python/database/models.py index bd7f1cd..f93557c 100644 --- a/python/database/models.py +++ b/python/database/models.py @@ -88,12 +88,12 @@ autoinstalls_table = Table('autoinstalls', meta, owners_table = Table('owners', meta, Column('owner_id', String, primary_key=True, nullable=False), - Column('ram_quota_total', Integer, nullable=True), - Column('ram_quota_single', Integer, nullable=True), - Column('disk_quota_total', Integer, nullable=True), - Column('disk_quota_single', Integer, nullable=True), - Column('vms_quota_total', Integer, nullable=True), - Column('vms_quota_active', Integer, nullable=True)) + Column('ram_quota_total', Integer, nullable=True, default=None), + Column('ram_quota_single', Integer, nullable=True, default=None), + Column('disk_quota_total', Integer, nullable=True, default=None), + Column('disk_quota_single', Integer, nullable=True, default=None), + Column('vms_quota_total', Integer, nullable=True, default=None), + Column('vms_quota_active', Integer, nullable=True, default=None)) machine_access_table = Table('machine_access', meta, Column('machine_id', Integer, ForeignKey('machines.machine_id', ondelete='CASCADE'), nullable=False, index=True), -- 1.7.9.5