Fix constraint on servers table in SQLite to allow ports < 1024. Fixes #3307

This commit is contained in:
Aditya Toshniwal
2018-06-05 10:46:41 +01:00
committed by Dave Page
parent 2860e82c63
commit 20ea8a69f5
2 changed files with 92 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ from flask_sqlalchemy import SQLAlchemy
#
##########################################################################
SCHEMA_VERSION = 15
SCHEMA_VERSION = 16
##########################################################################
#
@@ -111,7 +111,7 @@ class Server(db.Model):
hostaddr = db.Column(db.String(128), nullable=True)
port = db.Column(
db.Integer(),
db.CheckConstraint('port >= 1024 AND port <= 65534'),
db.CheckConstraint('port >= 1 AND port <= 65534'),
nullable=False)
maintenance_db = db.Column(db.String(64), nullable=True)
username = db.Column(db.String(64), nullable=False)