From 8125aea4f3552925f96728b70c5e9c09cfca3b31 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 16 Feb 2020 19:19:04 -0500 Subject: [PATCH] Clean up some database columns --- api-daemon/pvcapid/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-daemon/pvcapid/models.py b/api-daemon/pvcapid/models.py index 483f9f72..364a6721 100755 --- a/api-daemon/pvcapid/models.py +++ b/api-daemon/pvcapid/models.py @@ -68,7 +68,7 @@ class DBNetworkElement(db.Model): __tablename__ = 'network' id = db.Column(db.Integer, primary_key=True) - network_template = db.Column(db.Integer, db.ForeignKey("network_template.id")) + network_template = db.Column(db.Integer, db.ForeignKey("network_template.id"), nullable=False) vni = db.Column(db.Integer, nullable=False) def __init__(self, network_template, vni): @@ -94,7 +94,7 @@ class DBStorageElement(db.Model): __tablename__ = 'storage' id = db.Column(db.Integer, primary_key=True) - storage_template = db.Column(db.Integer, db.ForeignKey("storage_template.id")) + storage_template = db.Column(db.Integer, db.ForeignKey("storage_template.id"), nullable=False) pool = db.Column(db.Text, nullable=False) disk_id = db.Column(db.Text, nullable=False) source_volume = db.Column(db.Text)