Clean up some database columns

This commit is contained in:
Joshua Boniface 2020-02-16 19:19:04 -05:00
parent f3de900bdb
commit 8125aea4f3
1 changed files with 2 additions and 2 deletions

View File

@ -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)